Interface Parser<O>

    • Method Detail

      • getOptsType

        Class<O> getOptsType()
        The type of option object that this parser accepts.
        the type of option object that this parser accepts
        See Also:
      • parse

        <T> T parse​(Context context,
                    TypedData requestBody,
                    Parse<T,​O> parse)
             throws Exception
        Deserializes the request body of the context into an object.
        Type Parameters:
        T - the type of object to construct from the request body
        context - The context to deserialize
        requestBody - The request body to deserialize
        parse - The description of how to parse the request body
        The object representation of the request body, or null if this parser cannot parse to the requested type
        Exception - if an error occurs parsing the request