Re:Parsing JSON Is a Minefield (2016)
by ChrisMarshallNY on Monday October 11, 2021 @11:07AM
(#28829149)
> the much beloved XML
I can't quite resolve "beloved" and "XML" in the same sentence...
That said, I have used XML a lot, pretty much because of XML Schema.
I don't like it. No sir. Not one bit. Uh-uh...
But there's really no viable substitute.
When I design an API, I generally start with an object model, and use native converters to create XML and JSON from it.
I will provide an XML Schema with the XML variant. I often have to do this by hand, which sucks. There are tools to create Schema from dumps, but these are pretty limited. I may use them to "get me in the ballpark," but there's always lots of elbow grease.
I'll use the XML for testing, but I will usually use the JSON format for the actual implementation.
I can't quite resolve "beloved" and "XML" in the same sentence...
That said, I have used XML a lot, pretty much because of XML Schema.
I don't like it. No sir. Not one bit. Uh-uh...
But there's really no viable substitute.
When I design an API, I generally start with an object model, and use native converters to create XML and JSON from it.
I will provide an XML Schema with the XML variant. I often have to do this by hand, which sucks. There are tools to create Schema from dumps, but these are pretty limited. I may use them to "get me in the ballpark," but there's always lots of elbow grease.
I'll use the XML for testing, but I will usually use the JSON format for the actual implementation.