JsonSerializerexclude/include rules. This can be done with
BeanSerializer, in few steps like this:
BeanSerializerparse beans and match properties to all include/exclude rules. Resulting map will contain all included properties of a bean. Serializing this map or the bean should give exactly the same results!
JsonWriteris a simple class that writes JSON to the output. You can use it to construct JSON directly, without serialization:
Mapobject you can simply use the writer with the JSON result to create the same thing, but faster.