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?
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
Try in System.ServiceModel.Web.dll
Method 2
Are you running .NET 2.0 ? Its first supported in 3.5 and 4.0 check here.
Method 3
I think this library is now deprecated in favour of Json.NET. JsonObject is a JObject and uses Json.NET library.
Method 4
You might just need to update it in your VS, it can be added in the project but not updated
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0