I'm requesting data from a REST API in C#. The API offers me the same data in a JSON and XML format.
For which one should I go? It's clear which one I would choose in JavaScript. But what in C#? Are there any performance benefits to help me choose one over the other in C# or any good-practice reasons?
Thanks in advance!
Personally I would try both, measure the performance, compare and choose the one that's faster. From your application logic perspective this shouldn't really matter as it will be manipulating objects (not XML, nor JSON). The conversion of the XML/JSON to objects should be abstracted away into a repository which you could, within a blink of an eye, substitute with another implementation if you feel that the one you have chosen initially is slow or it doesn't work for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With