Closed GoogleCodeExporter closed 9 years ago
In the future please try and use the discussion group for questions:
http://groups.google.com/group/jsonexserializer-discuss
Do you mean serialize or deserialize? If you want to allow a ignored property
to be
populated during deserialization set the IgnoredPropertyAction
serializer.Context.IgnoredPropertyAction = IgnoredPropertyOption.SetIfPossible;
If the deserializer encounters an ignored property in the result stream it will
try
and set it if possible.
You can also programattically ignore a property at runtime:
http://code.google.com/p/jsonexserializer/wiki/IgnoreProperties
Enabling an ignored property is slightly more cumbersome but possible:
TypeHandler handler = serializer.GetTypeHandler(typeof(ChildClass));
foreach (AbstractPropertyHandler propHandler in handler.AllProperties) {
if (propHandler.Name == "stackTrace")
propHandler.Ignored = false;
}
Original comment by elliott....@gmail.com
on 17 Jul 2008 at 11:47
Oops, there was a typo in that last bit of code, it should be:
TypeHandler handler = serializer.Context.GetTypeHandler(typeof(ChildClass));
Original comment by elliott....@gmail.com
on 18 Jul 2008 at 12:27
Original comment by elliott....@gmail.com
on 19 Jul 2008 at 4:20
Original issue reported on code.google.com by
supadhy...@gmail.com
on 17 Jul 2008 at 2:49Attachments: