52

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?

4 Answers 4

62

Try in System.ServiceModel.Web.dll

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks man. But I thought it was in System.Runtime.Serialization!
System.Runtime.Serialization.dll, System.ServiceModel.dll and System.ServiceModel.Web.dll forums.silverlight.net/post/47045.aspx
This namespace seems even more scattered; this walkthrough states you can get part of the namespace only by installing a specific Nuget package: amazedsaint.com/2011/02/aspnet-mvc-dynamic-json-jquery.html
@ChrisMoschini that package doesn't seem to exist any more, but it is likely all it contained was some framework dependencies / reference-instructions (no actual dlls), to add the above reference (and some others)
Looked further into it: most of it was also migrated to Newtonsoft.Json / Json.Net (look for Newtonsoft on Nuget).
0

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

Comments

0

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

Documentation

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.