2 Intellij IDEA Hacks for java/kotlin developers : json stubs straight from the debugger!

52 Просмотры
Издатель
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
Категория
Язык программирования Kotlin
Комментариев нет.