public static String toJSONString ( Object o ) { try { return objectMapper . writer ( ) . without ( SerializationFeature . INDENT_OUTPUT ) . writeValueAsString ( o ) ; } catch ( JsonProcessingException e ) { throw new RuntimeException ( e ) ; } }
A not - pretty printed JSON string . Returns a portable JSON string .