Should I use Json or Xml in Silverlight?

advertisements

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).