I'm communicating with several services from a SL component using both TCP sockets & HTTP web requests and we are discussing what (data) format to use - JSON or XML.
I'm wondering what others 开发者_运维技巧have choosen and why?
Cheers
AWC
I choose XML, purely because there are inbuilt .NET classes for dealing with it, and it's a logical way of marking up data. I don't exactly see JSON as a data-markup format, more (as it's name implies) an Object markup style (i.e. methods, and so on).
So, technically it depends on what sort of data you are exchanging, but IMHO, I'd go with XML. It's handled quite well in the language, and well-known (which is a significant advantage when bringing on new people, or reading back over it yourself, etc).
JSON is my choice, because I love to have have access to created objects from JavaScript as well. But that's my particular situation...
精彩评论