Sheena
Sheena

Reputation: 16212

an easy way to serialise c# objects

I'm using Newtonsoft.Json to turn json into objects, that works fine. I was wondering if there's a nice way to reverse the process noting that i dont want to jsonise all the object fields. To paraphrase, is there a way to use Newtonsoft.Json to produce thinned down jsonised object representations?

Upvotes: 0

Views: 439

Answers (1)

Andrew Brown
Andrew Brown

Reputation: 4126

Have you tried using the JsonIgnore to opt-out properties that you don't want to be included in the JSON serialization? See this topic:

http://james.newtonking.com/projects/json/help/ReducingSerializedJSONSize.html

Upvotes: 1

Related Questions