From 0c2321c36d3bc4ec772822e256b35298b488f464 Mon Sep 17 00:00:00 2001 From: Harvie Date: Mon, 14 Jun 2010 00:30:27 +0200 Subject: [PATCH] some PERL playing with JSON --- perl/map-reduce/recursive-json.pl | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 perl/map-reduce/recursive-json.pl diff --git a/perl/map-reduce/recursive-json.pl b/perl/map-reduce/recursive-json.pl new file mode 100755 index 0000000..8c57d00 --- /dev/null +++ b/perl/map-reduce/recursive-json.pl @@ -0,0 +1,12 @@ +#!/usr/bin/env perl +use strict; +use warnings; + +use JSON; +use Data::Dumper; + +my $a={a=>{f=>"",b=>""},b=>{f=>"",b=>""}}; +$a->{"b"}=$a; + +print Dumper($a); +print encode_json($a)."\n" -- 2.30.2