code: public final static <T> T readJson(InputStream jsonStream, Class<T> clazz)
      {
          ObjectMapper mapper = new ObjectMapper();
          try
          {
              if (jsonStream != null)
              {
                  return mapper.readValue(jsonStream, clazz);
              }
              else
              {
                  LOGGER.error("InputStream is null.");
                  throw new KunderaException("InputStream is null.");
              }
          }
          catch (IOException e)
          {
              LOGGER.error("Error while mapping input stream to object. Caused By: ", e);
              throw new KunderaException("Error while mapping input stream to object. Caused By: ", e);
          }
  
      }
docs: Read json.
  
  @param <T>
  the generic type
  @param jsonStream
  the json stream
  @param clazz
  the clazz
  @return the t