News for hackers. Stuff that matters.
Re:Specifying JSON by drdaeman on Thursday May 19, 2016 @11:22AM (#11730898)
XML has its bad sides (hell, I won't ever forget hacking Perl's SOAP::Lite to make it be able to talk with some extremely enterprisey Java service), but its core isn't as bad as many try to picture it.

The really good thing about XML, that it - unlike JSON - is extensible.

And traversing both JSON and XML (without the weird parts) are no-brainers. Every (or about so) mainstream language has libraries that make either format really transparent to use.

Re:Specifying JSON by gnaritas on Sunday May 22, 2016 @12:41PM (#11749238)
> Every (or about so) mainstream language has libraries that make either format really transparent to use.

That's really only true about XML, that is not the case with JSON. JSON is a pain to work with in C# for example compared to XML.

Re:Specifying JSON by drdaeman on Thursday May 26, 2016 @07:56AM (#11777215)
I have different experience.

I did some toy project in C# and haven't found handling JSON any painful. Maybe I just haven't hit the bad cases, though.

I don't exactly remember what I've used and what I wrote, but I think I had just installed some library (IIRC it was Json.NET), put some annotations on classes, and got my serialization. For deserialization I didn't wanted to write throwaway classes so I just made a JSONPath query and iterated over the result objects, looking at necessary properties. Nothing particularly different from how things are in, say, Python, except maybe for some extra type checking.