code: @Override
      public <T> PagedResult<T> deserializeDataWrapper(Class<T> objectClass, java.io.InputStream inputStream) throws JSONSerializerException{
          Util.throwIfNull(objectClass, inputStream);
  
          PagedResult<T> rw = null;
  
          try {
              // Read the json input stream into a List.
              rw = OBJECT_MAPPER.readValue(inputStream,
                      OBJECT_MAPPER.getTypeFactory().constructParametrizedType(PagedResult.class, PagedResult.class, objectClass));
          } catch (JsonParseException e) {
              throw new JSONSerializerException(e);
          } catch (JsonMappingException e) {
              throw new JSONSerializerException(e);
          } catch (IOException e) {
              throw new JSONSerializerException(e);
          }
  
          return rw;
      }
docs: De-serialize to a PagedResult (holds pagination info) from JSON
  @param objectClass
  @param inputStream
  @param <T>
  @return
  @throws JSONSerializerException