This project has moved. For the latest updates, please go here.

Ignoring Properties in Object

Sep 15, 2008 at 3:26 PM

I know it is possible with JSON.NET to ignore certain properties from being serialized by putting attributes on the model.

This in most case should be ok but have part of my model where I want to ignore some properties at one point but not at other times.

flexjson ( for Java achieves this

return new JSONSerializer().include("phoneNumbers", "addresses.zipcode").serialize(p);

is there any equivalent in JSON.NET.

Kind Regards
Sep 18, 2008 at 5:38 AM
No there isn't an equivalent.
Apr 13, 2009 at 3:24 PM
This kind of control would be very handy. We need it for selectable columns in a data grid. I would rather there be some type-based filter object that could be registered with the serializer with the default using the current attribute-based arrangement.