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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -

php - Accessing static methods using newly created $obj or using class Name -