code: @Deprecated
    public static <T> T getStateAsObject(HalResource halResource, Class<T> type) {
      return halResource.adaptTo(type);
    }
docs: Converts the JSON model to an object of the given type.
  @param halResource HAL resource with model to convert
  @param type Type of the requested object
  @param <T> Output type
  @return State as object
  @deprecated use {@link HalResource#adaptTo(Class)}