Relative Content

Tag Archive for javajsonjackson

Custom conditional Map serialization with Jackson

I need to conditionally serialize a Map to a String. I.e. when Map meets some condition, I want to replace the whole resulting JSON object with the single custom value, e.g. String. I am trying to implement it like this: