Search This Blog

Tuesday, February 18, 2020

fasterxml jackson ObjectMapper produces JSON string with '=' and not ':'

Produces [key=value]
new ObjectMapper ().writerWithDefaultPrettyPrinter ().writeValueAsString ( responseVO.toString() )


Produces {"key":"value"}
new ObjectMapper ().writerWithDefaultPrettyPrinter ().writeValueAsString ( responseVO )


Note : Dont convert toString and pass taht to writeValueAsString ()

No comments:

Hit Counter


View My Stats