code: public static <T extends BasicMessage> T fromJSON(String json, Class<T> clazz) {
          try {
              Method buildObjectMapperForDeserializationMethod = findBuildObjectMapperForDeserializationMethod(clazz);
  
              final ObjectMapper mapper = (ObjectMapper) buildObjectMapperForDeserializationMethod.invoke(null);
              if (FailOnUnknownProperties.class.isAssignableFrom(clazz)) {
                  mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, true);
              }
  
              return mapper.readValue(json, clazz);
          } catch (Exception e) {
              throw new IllegalStateException("JSON message cannot be converted to object of type [" + clazz + "]", e);
          }
      }
docs: Convenience static method that converts a JSON string to a particular message object.
  
  @param json the JSON string
  @param clazz the class whose instance is represented by the JSON string
  
  @return the message object that was represented by the JSON string