Closed ramjke closed 2 years ago
It's not an intended usage of ignore flag. Instead you would like to ignore unknown type, so for that to work please use following example
JsonMapper.serialize(new Folder(file: localFile), SerializationOptions(ignoreUnknownTypes: true));
then JsonMapper.serialize(new Folder(file: localFile)) throws:
Unhandled Exception: It seems your class '_File' has not been annotated with @jsonSerializable
Expected: Serialize ignores file field on serialize