dortzur dortzur - 8 days ago 6
JSON Question

json.net vs DataContractJsonSerializer

I know there's a DataContractJsonSerializer that comes now with the .net framework and is used by wcf ajax enabled services. However, I've noticed there's also a json.net project over at codeplex.
I'm wondering if there are any advantages or features that are present in the codeplex project that are missing from the .net framework.

Answer

json.net has next pros:

  • Control over how dates get formatting (the \/Date(123)\/ MS AJAX style)
  • The ability to serialize object graphs that contain cycles (by telling Json.NET to ignore them)

There are a lot of explanation how its reflects on WCF developing here.

Also, regarding to http://banachowski.com/deprogramming/2010/08/json-net-vs-net-datacontractjsonserializer/ it has better performance, but this results can be argued.