Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Parsing nested JSON (duplicate keys)

by LanX (Saint)
on Oct 04, 2021 at 21:56 UTC ( [id://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?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-25 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found