In the latest Jackson 2.14 you can't use WRITE_NUMBERS_AS_STRINGS
which is deprecated:
ObjectMapper mapper = new ObjectMapper();
mapper.configure(JsonGenerator.Feature.WRITE_NUMBERS_AS_STRINGS, true); // DEPRECATED!
Also you can't use @JsonSerialize(using = ToStringSerializer.class)
:
These were the suggestions offered in this thread. So how do we now cast fields to Strings in the latest Jackson? Some examples would be appreciated, because I couldn't find any.