Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I am having some isssue with JSON decode_json functionality. I am getting error as
'"' expected, at character offset 65 (before "}") at sample.pl line 7.
Please find the below code and help me to resolve this problem
Thanks#!/usr/bin/perl use JSON qw(decode_json); use Data::Dumper; my $var = { 'POSTDATA' => '{ "emailid" : "test@test.com", "name" : "Jo +hn", "id" : "ID1020", }' }; my $postdata = $var->{POSTDATA}; my $json_decode = decode_json($postdata); print Dumper($json_decode);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: JSON - decode_json function is not working.
by choroba (Cardinal) on Apr 13, 2013 at 00:27 UTC | |
by Anonymous Monk on Apr 13, 2013 at 00:34 UTC | |
|
Re: JSON - decode_json function is not working.
by RichardK (Parson) on Apr 13, 2013 at 11:45 UTC |