#!/bin/env/perl use JSON; my %h = ( "org" => "DESY", "town" => "Hamburg"); my $str = encode_json( \%h); print $str . "\n"; my $ref = decode_json( $str); print $$ref{"org"} . "\n";