class Foo {
String name = "Bar";
}
Serialising the above object using ObjectMapper().convertValue(foo, JsonNode::class)
will return JSON object as:
{
"name": "Bar"
}
my desired result however is:
{
name: "Bar"
}
I have tried a custom serialiser but it always writes keys as strings. Is there a way to serialise my POJO in this format using Jackson or any of it's annotation to avoid a substituting chars or building the string my self.