Interface GetResponseParser<X>

Type Parameters:
X - the object to parse
All Superinterfaces:
Context, KeyPathContext, KeyValuesCollectionParser<X>
All Known Implementing Classes:
EnumContext, InstantContext, KeyPathPrefixContext, KeyPathSimpleValue, ModContext, OptionalLongContext, RawValueContext, StringContext, UpdateCountContext

public interface GetResponseParser<X> extends KeyPathContext, KeyValuesCollectionParser<X>
An interface for parsing GetResponses. (todo: documentation around exceptional cases)
  • Method Details

    • parse

      default X parse(GetResponse response)
      The response's request path must be equal to our own context's path.

      Implementations should call checkContext(GetResponse)

      Parameters:
      response - the get response
      Returns:
      the parsed value
    • getContext

      KeyPathContext getContext()
      The context where the parser will look for data in the response
    • checkContext

      default void checkContext(GetResponse response)