if you are looking for the code used as renderer, here it is:
if (null == this || this instanceof String) return this;
ObjectMapper mapper = new ObjectMapper();
return mapper.writerWithDefaultPrettyPrinter()
.writeValueAsString(this);
You can customized it further for your needs (e.g. custom date serializer) but this is a good starting base
if (null == this || this instanceof String) return this;
ObjectMapper mapper = new ObjectMapper();
return mapper.writerWithDefaultPrettyPrinter()
.writeValueAsString(this);
You can customized it further for your needs (e.g. custom date serializer) but this is a good starting base
- Категория
- Язык программирования Kotlin
Комментариев нет.