Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

cannot find class DataContractJsonSerializer .net 4.0

Tags:

.net

I am trying to create an object of DataContractJsonSerialize

using System.Runtime.Serialization.Json; does not work, I am using .Net 4.0 I have added a referece to System.ServiceModel.Web, i also have using System.ServiceModel.Web; in my using statements.

everywhere i read said to adda reference to System.ServiceModel.Web.dll, but that did not fix it for me

like image 372
Frank Avatar asked Jan 16 '23 04:01

Frank


1 Answers

According to MSDN, DataContractJsonSerializer is implemented in System.Runtime.Serialization.dll:

http://msdn.microsoft.com/en-us/library/system.runtime.serialization.json.datacontractjsonserializer.aspx

Make sure you have a reference to that assembly?

like image 78
reuben Avatar answered Jan 26 '23 01:01

reuben