java - How to serialize all int and boolean field to String with Jackson Json lib -
i'm working on aria2 jsonrpc remote revoke, , found out aria2 accept strings value, number 1 should "1".
although can use jsonserializer annotation or use module method, think there should easy way apply "int string serializer" of fields of type int.
could give me hint how this?
finally, found article has described 3 steps that, , thought may through answer:
create custom serializer extending stdserializer class
create object of simplemodule class, adding custom serializer , specifying class must used
register module on objectmapper instance
ref: jackson: create , register custom json serializer stdserializer , simplemodule classes
Comments
Post a Comment