45 ms·
> 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 c
by gnaritas 10y ago
> 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.
- drdaeman 10y agoI 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.