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