decode_json is a function. It returns the data structure and does not modify its argument in place. You might want:
my $foo; my $ok= eval { $foo= decode_json( $foo_info ); 1; }; if( ! $ok ) { my $err= $@; flash error => "Failed"; warn "JSON Decoder got '$err'"; }; # Now we have the decoded data structure in $foo warn Dumper $foo;
In reply to Re: Checking JSON decoded params from Dancer
by Corion
in thread Checking JSON decoded params from Dancer
by PerlSufi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |