Hi Miyako,
I'll take a guess: If your JSON string looks like "[ ... ]", then decode_json should return an array reference, not an array as you seem to want with my @apiJson = decode_json( $apiContent );. Instead, you'll have to dereference that array reference with something like my $apiJson = decode_json( $apiContent ); my $msgID = $apiJson->[0]->{'id'};
Hope this helps,
-- Hauke D
In reply to Re: Perplexing JSON decoding issue.
by haukex
in thread Perplexing JSON decoding issue.
by Miyako
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |