java - Can I access other model properties in my custom Jackson Serializer? -
i have created custom serializer , i'm using serializer on property in model using @jsonserialize(using = myserializer.class)
annotation
i have overriden serializer method jsonserializer
class.
@override public void serialize(object value, jsongenerator jgen, serializerprovider provider) throws ioexception, jsonprocessingexception { }
the output of property depends on value of other properties in model, there way can access these properties in serializer?
you need create serializer whole class not 1 property. can same annotation using.
Comments
Post a Comment