Package ratpack.parse

Interface Parser<O>

    • Method Detail

      • getOptsType

        java.lang.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 java.lang.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
        java.lang.Exception - if an error occurs parsing the request