in reply to Parsing nested JSON
Hippo already told you that the problem are duplicate keys in your JSON, but ... the answer is unfortunately more complex.
Please see
- The short answer: Yes but is not recommended.
- The long answer: It depends on what you call valid...
Does JSON syntax allow duplicate keys in an object?
So your options are:
- If you are the author of that JSON structure, please correct it.
- Otherwise it's pretty unclear how the result after conversion should look like, since Perl definitely doesn't allow (well overwrites) duplicated keys.
- If you are stuck with that format you can try to fiddle a solution with another module like JSON::Parse (see "SEE ALSO"), good luck!
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
|
---|
In Section
Seekers of Perl Wisdom