public static < T > String toJson ( final T object , final boolean newMapper ) throws JsonProcessingException { final ObjectMapper mapper = ObjectMapperFactory . getObjectMapper ( newMapper ) ; final String json = mapper . writeValueAsString ( object ) ; return json ; }
To json .