Newtonsoft.Json icon indicating copy to clipboard operation
Newtonsoft.Json copied to clipboard

Allow a serialization binder to be specified for a particular property (using jsonpropertyattribute)

Open martinbooth opened this issue 11 years ago • 2 comments

When attempting to create a SerializationBinder to customize the $type property on json, I realised that if I customized it for one property, i'd be customizing it for them all.

Since there is no context available within BindToType and BindToName, its impossible to know which property is currently being serialized/deserialized.

Therefore it is possible with this modification to specify a different SerializationBinder per property.. each with their own behaviour.

martinbooth avatar May 09 '13 04:05 martinbooth

I'd like this feature as well, I currently have a very similar problem

edanielsen avatar May 13 '13 02:05 edanielsen

I am not sure if this is the right place to ask this question but does anybody knows how to make this binder property disappear from Json's?

Bab95 avatar May 05 '22 16:05 Bab95