Package | Description |
---|---|
ratpack.form |
Support for handling uploaded forms, including file uploads.
|
ratpack.gson |
Provides integration with Google Gson for JSON parsing and rendering.
|
ratpack.handling |
The handling of application requests.
|
ratpack.jackson |
Integration with the Jackson JSON marshalling library.
|
ratpack.parse |
Parsing in Ratpack refers to deserializing a request body into a Java object of some type.
|
Modifier and Type | Method and Description |
---|---|
static Parse<Form,FormParseOpts> |
Form.form()
Creates a
parseable object to parse a request body into a Form . |
static Parse<Form,FormParseOpts> |
Form.form(boolean includeQueryParams)
Creates a
parseable object to parse a request body into a Form . |
Modifier and Type | Method and Description |
---|---|
static <T> Parse<T,GsonParseOpts> |
Gson.fromJson(java.lang.Class<T> type)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,GsonParseOpts> |
Gson.fromJson(java.lang.Class<T> type,
com.google.gson.Gson gson)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,GsonParseOpts> |
Gson.fromJson(com.google.common.reflect.TypeToken<T> type)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,GsonParseOpts> |
Gson.fromJson(com.google.common.reflect.TypeToken<T> type,
com.google.gson.Gson gson)
Creates a
parseable object to parse a request body into the given type. |
static Parse<com.google.gson.JsonElement,GsonParseOpts> |
Gson.jsonElement()
Creates a
parseable object to parse a request body into a JsonElement . |
static Parse<com.google.gson.JsonElement,GsonParseOpts> |
Gson.jsonElement(com.google.gson.Gson gson)
Creates a
parseable object to parse a request body into a JsonElement . |
Modifier and Type | Method and Description |
---|---|
<T,O> Promise<T> |
Context.parse(Parse<T,O> parse)
Parses the request body into an object.
|
<T,O> T |
Context.parse(TypedData body,
Parse<T,O> parse)
Parses the provided request body into an object.
|
Modifier and Type | Method and Description |
---|---|
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(java.lang.Class<T> type)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(java.lang.Class<T> type,
ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(com.google.common.reflect.TypeToken<T> type)
Creates a
parseable object to parse a request body into the given type. |
static <T> Parse<T,JsonParseOpts> |
Jackson.fromJson(com.google.common.reflect.TypeToken<T> type,
ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into the given type. |
static Parse<JsonNode,JsonParseOpts> |
Jackson.jsonNode()
Creates a
parseable object to parse a request body into a JsonNode . |
static Parse<JsonNode,JsonParseOpts> |
Jackson.jsonNode(ObjectMapper objectMapper)
Creates a
parseable object to parse a request body into a JsonNode . |
Modifier and Type | Method and Description |
---|---|
static <T> Parse<T,?> |
Parse.of(java.lang.Class<T> type)
Creates a parse object, with no options.
|
static <T,O> Parse<T,O> |
Parse.of(java.lang.Class<T> type,
O opts)
Creates a parse object.
|
static <T> Parse<T,?> |
Parse.of(com.google.common.reflect.TypeToken<T> type)
Creates a parse object, with no options.
|
static <T,O> Parse<T,O> |
Parse.of(com.google.common.reflect.TypeToken<T> type,
O opts)
Creates a parse object.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
Parser.parse(Context context,
TypedData requestBody,
Parse<T,O> parse)
Deserializes the request body of the context into an object.
|
<T> T |
NoOptParserSupport.parse(Context context,
TypedData requestBody,
Parse<T,java.lang.Void> parse)
Delegates to
NoOptParserSupport.parse(ratpack.handling.Context, ratpack.http.TypedData, TypeToken) , discarding the opts object of the given parse . |