Top "Datacontractjsonserializer" questions

DataContractJsonSerializer is a .NET component that makes it possible to directly serialize .NET objects into JSON data and to deserialize such data back into instances of .NET types.

How do I serialize a C# anonymous type to a JSON string?

I'm attempting to use the following code to serialize an anonymous type to JSON: var serializer = new DataContractJsonSerializer(thing.GetType()); …

c# json anonymous-types datacontractjsonserializer json-serialization
Proper way to handle the ampersand character in JSON string send to REST web service

OK, I am using the System.Runtime.Serialization and the DataContractJsonSerialization. The problem is that in the request I send …

c# json windows-phone-8 httpwebrequest datacontractjsonserializer
DataContractJsonSerializer - Deserializing DateTime within List<object>

I'm having trouble using the System.Runtime.Serialization.Json.DataContractJsonSerializer class to deserialize DateTime instances contained within a List<…

c# json datacontractjsonserializer
Deserialization of JSON object by using DataContractJsonSerializer in C#

I'm sure this question has been asked over and over again, but for some reason, I still can't manage to …

c# json datacontractjsonserializer
error deserializing the object of type .... End element '......' from namespace '' expected. Found element 'item' from namespace ''

When I deserialize my jsonstring ,I am getting error message There was an error deserializing the object of type RecordInfo. …

c# json datacontractjsonserializer
System.Runtime.Serialization.Json.DataContractJsonSerializer.WriteObject ignores NonSerialized attribute while serializing

If i try to serialize an object of the following ClassToSerialize class with System.Runtime.Serialization.Json.DataContractJsonSerializer [DataContract,Serializable] …

c# json datacontractjsonserializer
DataContractJsonSerializer to skip nodes with null values

I am using DataContractJsonSerializer to serialize my custom object to JSON. But i want to skip the data members whose …

c# serialization datacontractserializer datacontractjsonserializer
Deserialize json with C# .NET Core

Im trying to deserialize data that Ive got over POST in JSON format but having some problem. The error message …

c# json serialization .net-core datacontractjsonserializer
Expecting element 'root' from namespace ''.. Encountered 'None' with name '', namespace ''

I've been searching for the past 4 hours for ways on how to tackle this problem, and I've not yet found …

c# json serialization deserialization datacontractjsonserializer
JSON sample to [DataContract]

Is there any tool allowing to generate DataContract entity definitions based on a JSON sample? I'm really missing the old …

c# json serialization datacontract datacontractjsonserializer