Where is the System.Runtime.Serialization.Json namespace?

C#asp.netasp.net MvcJsonSerialization

C# Problem Overview


I've added the reference to System.Runtime.Serialization dll to my project but still can't find the System.Runtime.Serialization.Json namespace and hence can't find the DataContractJsonSerializer class. What am I missing here?

C# Solutions


Solution 1 - C#

Try in System.ServiceModel.Web.dll

Solution 2 - C#

Are you running .NET 2.0 ? Its first supported in 3.5 and 4.0 check here.

Solution 3 - C#

I think this library is now deprecated in favour of Json.NET. JsonObject is a JObject and uses Json.NET library.

Documentation

Solution 4 - C#

You might just need to update it in your VS, it can be added in the project but not updated

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionKayesView Question on Stackoverflow
Solution 1 - C#Marc GravellView Answer on Stackoverflow
Solution 2 - C#ntziolisView Answer on Stackoverflow
Solution 3 - C#nestView Answer on Stackoverflow
Solution 4 - C#JulianView Answer on Stackoverflow