Jackson YAML Serialization with and without quotes

136 Views Asked by At

I am trying to Serialize YAML where I need some String field values with quotes and some without quotes (Raw) like

name: "John"
department: Finance

I am able to achieve the no quotes with

YAMLFactory().enable(YAMLGenerator.Feature.MINIMIZE_QUOTES)

but I need a mix of values with and without quotes. How do I achieve this?

0

There are 0 best solutions below