public static String stringify ( ObjectMapper mapper , Object object ) { try { return mapper . writeValueAsString ( object ) ; } catch ( JsonProcessingException e ) { throw new IllegalArgumentException ( e ) ; } }
Takes an object and converts it to a string .