Asp.net MVC json or Json.net?




asp.net-mvc (2)

In the past I have worked with a .NET JSON library that utilized an opt-in or opt-out method of denoting which members of a class are serialized. In reviewing the NerdDinner sample application I see a class in the SearchController called JsonDinner which looks like a regular Dinner class, but seems to be in existence only to properly output a few extra details that could be argued are only view related and not truly model related features. In this simple case, an attribute notation mechanism on the model, identifying the pieces to be serialized to JSON would result in a reduced amount of hand-maintained code.

I am now using asp.net mvc and wondering what is a better choice using the built in Json or Json.Net I am not sure if one has an advantage over another.

Also if I do choose to go down the route of Json.Net then should I go with the stable version or beta 4? I am not sure how unstable the betas are.


My thought is that I haven't found any problems with baked in Json. I would suggest going with that until you find something that doesn't work. Fewer dependencies makes simpler debugging.





json.net