Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

Re: Parsing nested JSON (duplicate keys)

by LanX (Sage)
on Oct 04, 2021 at 21:56 UTC ( #11137219=note: print w/replies, xml ) Need Help??

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

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

  • Comment on Re: Parsing nested JSON (duplicate keys)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137219]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2021-11-28 09:23 GMT
Find Nodes?
    Voting Booth?

    No recent polls found