Quantcast
Channel: JSON and XML Serialization
Browsing latest articles
Browse All 25 View Live

Comment Posted by jayesh_sorathia

To learn more on XML Serialization and Deserialization visit this links.XML Serialization : jayeshsorathia.blogspot.com/XML Deserialization : jayeshsorathia.blogspot.com/These links contains samples...

View Article



Comment Posted by daniel vaughan

Thanks for the section on Testing Object Serialization, Mike. Very useful.Cheers,Daniel

View Article

Comment Posted by MikeWasson

ognyandim: Which properties/namespaces? This topic *should* be up-to-date for the RC release, but it's possible I have some errors.

View Article

Comment Posted by ognyandim

Very good explanation. The code is outdated and some of the properties and namespaces are not existent.

View Article

Comment Posted by MikeWasson

@rrjp: As of RC, the JsonMediaTypeFormatter uses JSON.Net, so you shouldn't need to add JSON.Net.

View Article


Comment Posted by rrjp

So, if I want to use [JsonIgnore] in my code, I need to download Json.NET from CodePlex and reference it from the Json.NET library? Just want to make sure you aren't already exposing it through...

View Article

Comment Posted by MikeWasson

@dcowan: Yes, thanks!@nachof: If you use the [DataContract] attribute, you can set the namespace for the type. [DataContract(Namespace="mynamespace")]

View Article

Comment Posted by dcowan

Just wanted to let you know there is an error in your last example str = Serialize(xml, value);should be str = Serialize(json, value);

View Article


Comment Posted by nachof

Hey Mike, is there a way to cleanup the namespaces the default DataContractSerializer outputs?stackoverflow.com/

View Article


Comment Posted by erikkl2000

Thank you mike...

View Article

Comment Posted by ProcuraIsaac

Relating to my question above, I mean specifically related to ModelBinding and ModelState. [DataMember(Name = "start", IsRequired = true)] public DateTime StartDate { get; set; }JSON passed to my...

View Article

Comment Posted by ProcuraIsaac

Is it possible to have the JSON.NET serializer look at the DataMember Name attribute like the XML serializer does?"To change how a member name appears in the XML, set the Name parameter in the...

View Article

Comment Posted by ramiljoaquin

The "Testing Object Serialization" section saves my day. Thanks Mike !I would remove the "Headers" from this line though: formatter.WriteToStreamAsync(typeof(T), value, stream, content.Headers,...

View Article


Comment Posted by Sathyaish

Mike, I enjoy reading your articles very much.This article helped me solve an empty 500 HttpStatusCode I was receiving from my Web API for no reason I could see. I landed on this from one of the...

View Article

Comment Posted by reps

I would like to add that DateTime is NOT written in ISO 8601 format (both with JSON and XML serializers). It has no Z suffix. This is the output I get: "2013-04-21T22:10:56.65". To have ISO 8601...

View Article


Comment Posted by wsyeager36

Great tip informing us about the circular references!

View Article

Comment Posted by ttigertim719

Thank you Mike. You may want to change"The IsReference parameter enables 'oibject references'"to "object references"

View Article


Comment Posted by scott98390

Where do I put the code to configure the JsonMediaTypeFormatter class? The WebApiConfig class?

View Article

Comment Posted by peterk5087

Mike, Thanks for all the great articles. You consistently cut to the chase and give clear, useful info for developers. I hope all the MSDN/ASP.NET/MS documentation reaches the bar you've set!

View Article

Comment Posted by MikeWasson

@ttigertim719 - whups, thanks! I'll fix that.

View Article

Comment Posted by MikeWasson

@alborz: Json.NET is the default JSON serializer. Rick's blog post was about the beta release.

View Article


Comment Posted by alborz

You mentioned that "By default, JsonMediaTypeFormatter uses the Json.NET library to perform serialization". But Rick Strahl expresses that it uses the DataContractJsonSerializer by default. Witch one...

View Article


Comment Posted by alimaxion

Thanks Mike this is really helpful :-)

View Article

Comment Posted by shindongjoo

hi mike...thanks a lot.There are questions...When the class is serialized to xml, i want to serialized that class is represented as a node, and the properties of the class represented as attribute .As...

View Article

Comment Posted by stratdaz

Hi Mike,I using an EntitySetController (well, an AsyncEntitySetController really) to return data but am having trouble getting it to return UTC dates (with a "Z" suffix).I've tried setting up the...

View Article

Browsing latest articles
Browse All 25 View Live




Latest Images