How to convert type
You can use the json.rule.convert rule to convert one type to another.
Usage
properties
# Convert Date to String
json.rule.convert=groovy:it.type().name()=="java.util.Date" => java.lang.StringCommon conversions
properties
json.rule.convert=groovy:it.type().name()=="java.util.Date" => java.lang.String
json.rule.convert=groovy:it.type().name()=="java.time.LocalDateTime" => java.lang.String
json.rule.convert=groovy:it.type().name()=="java.time.LocalDate" => java.lang.String
json.rule.convert=groovy:it.type().name()=="java.math.BigDecimal" => java.lang.DoubleCustom type conversion
properties
# Convert a custom type to Map
json.rule.convert=groovy:it.type().name()=="com.example.CustomObject" => java.util.MapSee json.rule.convert.