public static String serialize ( final Object obj ) throws IOException { final ObjectMapper mapper = new ObjectMapper ( ) ; mapper . disable ( MapperFeature . USE_GETTERS_AS_SETTERS ) ; return mapper . writeValueAsString ( obj ) ; }
Serialize an object with Json