datacontractjsonserializer Questions
3
I use DataContractJsonSerializer and StringContent to send JSON to a web service:
DataContractJsonSerializer serializer = new DataContractJsonSerializer(typeof(Employee));
MemoryStream ms = new Me...
Kell asked 19/4, 2013 at 6:29
5
Solved
I'm having trouble using the System.Runtime.Serialization.Json.DataContractJsonSerializer class to deserialize DateTime instances contained within a List<object>. I cannot seem to get DateTim...
Microanalysis asked 13/2, 2012 at 19:10
9
Solved
I'm attempting to use the following code to serialize an anonymous type to JSON:
var serializer = new DataContractJsonSerializer(thing.GetType());
var ms = new MemoryStream();
serializer.WriteObje...
Aviate asked 1/12, 2008 at 19:48
1
Solved
Im trying to deserialize data that Ive got over POST in JSON format but having some problem.
The error message is:
SerializationException: Expecting state 'Element'.. Encountered 'Text' with na...
Toadinthehole asked 3/1, 2018 at 10:22
1
Basically a dupe of this question with one notable difference - I have to use DataContractJsonSerializer.
A simple
using (var stream = new MemoryStream())
{
var serializer = new DataContra...
Xerxes asked 27/10, 2015 at 15:10
2
Solved
When I deserialize my jsonstring ,I am getting error message
There was an error deserializing the object of type RecordInfo. End element 'Warning' from namespace '' expected. Found element 'item'...
Seminar asked 5/4, 2013 at 19:37
3
Solved
Various places I've been reading have pointed out that on deserialization, the .NET Framework makes a call to FormatterServices.GetUninitializedObject, in which constructors are not called and fiel...
Jeweller asked 16/2, 2011 at 20:55
2
Solved
I'm using web service to get data about route mileage. Then I'm using deserializer to parse it out. Here is how JSON looks:
[{"__type":"CalculateMilesReport:http:\/\/pcmiler.alk.com\/APIs\/v1.0","...
Roup asked 20/12, 2015 at 19:18
2
Solved
Is there any tool allowing to generate DataContract entity definitions based on a JSON sample? I'm really missing the old good WSDL metadata with code generation facilities.
Hiroshige asked 28/10, 2011 at 18:20
1
Solved
I'm using the HL7.Fhir nuget package 0.9.3 created by Ewout Kramer.
I am tying it up with ASP.NET Web API, but unfortunately the built in JSON serialization isn't generating the JSON correctly. It...
Opponent asked 14/1, 2014 at 15:52
3
I have an object tree that I'm serializing to JSON with DataContractJsonSerializer. Dictionary<TKey, TValue> gets serialized but I don't like the markup - the items are not rendered like this...
Brut asked 21/9, 2011 at 10:23
2
Solved
OK,
I am using the System.Runtime.Serialization and the DataContractJsonSerialization.
The problem is that in the request I send a value of a property with the & character. Say, AT&T, and...
Alaster asked 9/9, 2013 at 22:10
1
Solved
I am using DataContractJsonSerializer to serialize my custom object to JSON. But i want to skip the data members whose values are null. If DataMember is null that node should not come in JSON strin...
Whereunto asked 22/11, 2012 at 5:55
1
How can I set the maxItemsInObjectGraph for the DataContractJsonSerializer?
I get an error saying "Maximum number of items that can be serialized or deserialized in an object graph is '65536'. Cha...
Biting asked 3/5, 2011 at 9:1
1
Solved
I have a date time in the database and I retrieve it from the database using Entity Framework, I then pass out the data via JSON API through the DataContractJsonSerializer.
The time in the date ti...
Variance asked 15/4, 2011 at 11:7
1
© 2022 - 2024 — McMap. All rights reserved.