| ▲ | sfn42 11 hours ago | |||||||
Not really. In C# I use a parsing library for which I just write a class and then the library automatically serializes the JSON into an instance of that class. I can do the same thing with XML. Of course it doesn't necessarily go that smoothly with all xml, but as long as the xml is fairly simple like a JSON document would be it's totally fine. It's only when you start to use all the features of xml that don't fit neatly into a class model that it starts to get annoying. But if JSON serves your needs then simple xml does as well. I wouldn't use it because JSON works just fine but it's not as bad as people make it seem, unless people make it really bad. | ||||||||
| ▲ | kccqzy 11 hours ago | parent | next [-] | |||||||
That is actually a good approach that I have also used a lot: let the parsing library handle everything including the serialization and deserialization. But if you do that, why do you care that behind the scenes it is using JSON or XML or protobuf or something else? | ||||||||
| ||||||||
| ▲ | gf000 10 hours ago | parent | prev [-] | |||||||
I would even go as far to say that XML may very well be better in some cases, - here you have a schema most of the time, so you can often catch e.g. schema evolution failures at compile time. This is much less common/less standardized with json. | ||||||||
| ||||||||