private static String toJsonStr ( Object object ) throws JsonGenerationException , JsonMappingException , IOException { return mapper . writeValueAsString ( object ) ; }
Transfer Object to JSON String .