Flutterby™! : JSON all the XML all the things

Next unread comment / Catchup all unread comments User Account Info | Logout | XML/Pilot/etc versions | Long version (with comments) | Weblog archives | Site Map | | Browse Topics

JSON all the XML all the things

2015-06-17 23:36:16.200504+00 by Dan Lyke 6 comments

Amazon's new API format: XML wrapped in JSON. https://payments.amazon.com/do...on/automatic/201752090#201757720

[ related topics: Web development Books Content Management Invention and Design ]

comments in ascending chronological order (reverse):

#Comment Re: JSON all the XML all the things made: 2015-06-18 01:59:14.107083+00 by: meuon

I was hoping you were kidding and this was a joke: Then I saw it.

#Comment Re: JSON all the XML all the things made: 2015-06-18 02:07:13.644317+00 by: Jack William Bell

What he said...

How do you parse it?

#Comment Re: JSON all the XML all the things made: 2015-06-18 13:16:24.293693+00 by: Dan Lyke [edit history]

You parse it with a regular expression, the same way you parse any XML...

#Comment Re: JSON all the XML all the things made: 2015-06-18 14:17:36.477775+00 by: meuon

Laughing. At some point it has JSON+XML embedded in JSON. And the XML is not very clean. I'd be cutting it into chunks and fixing it with RegEx's.. and then MAYBE parse the chunks with "json_decode" and an XML parser, but I'd be tempted to just suck out what I want with some logic and RegEx's without ever trying to fix it.

#Comment Re: JSON all the XML all the things made: 2015-06-18 16:37:57.32509+00 by: Dan Lyke

The good news is that at least it's apparently not some sort of gawdawful pseudo-XML-ish abomination of a thing like Apache config files or Freeswitch outputs use.

#Comment Re: JSON all the XML all the things made: 2015-06-21 14:12:45.515583+00 by: concept14

At least it can be parsed with open source tools, unlike what somebody at my work once proposed: JSON in Excel spreadsheet cells.