Package play.mvc
Class BodyParser.Json
java.lang.Object
play.mvc.BodyParser.MaxLengthBodyParser<A>
play.mvc.BodyParser.BufferingBodyParser<com.fasterxml.jackson.databind.JsonNode>
play.mvc.BodyParser.TolerantJson
play.mvc.BodyParser.Json
- All Implemented Interfaces:
BodyParser<com.fasterxml.jackson.databind.JsonNode>
- Enclosing interface:
- BodyParser<A>
Parse the body as Json if the Content-Type is text/json or application/json.
-
Nested Class Summary
Nested classes/interfaces inherited from interface play.mvc.BodyParser
BodyParser.AnyContent, BodyParser.BufferingBodyParser<A>, BodyParser.Bytes, BodyParser.CompletableBodyParser<A>, BodyParser.Default, BodyParser.DelegatingBodyParser<A,B>, BodyParser.DelegatingMultipartFormDataBodyParser<A>, BodyParser.Empty, BodyParser.FormUrlEncoded, BodyParser.Json, BodyParser.MaxLengthBodyParser<A>, BodyParser.MultipartFormData, BodyParser.Of, BodyParser.Raw, BodyParser.TemporaryFile, BodyParser.Text, BodyParser.ToFile, BodyParser.TolerantJson, BodyParser.TolerantText, BodyParser.TolerantXml, BodyParser.Xml -
Constructor Summary
ConstructorsConstructorDescriptionJson(long maxLength, HttpErrorHandler errorHandler) Json(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler) -
Method Summary
Modifier and TypeMethodDescriptionAccumulator<ByteString,F.Either<Result, com.fasterxml.jackson.databind.JsonNode>> apply(Http.RequestHeader request) Return an accumulator to parse the body of the given HTTP request.Methods inherited from class play.mvc.BodyParser.TolerantJson
parseMethods inherited from class play.mvc.BodyParser.BufferingBodyParser
apply1
-
Constructor Details
-
Json
-
Json
@Inject public Json(play.api.http.HttpConfiguration httpConfiguration, HttpErrorHandler errorHandler)
-
-
Method Details
-
apply
public Accumulator<ByteString,F.Either<Result, applycom.fasterxml.jackson.databind.JsonNode>> (Http.RequestHeader request) Description copied from interface:BodyParserReturn an accumulator to parse the body of the given HTTP request.The accumulator should either produce a result if an error was encountered, or the parsed body.
- Specified by:
applyin interfaceBodyParser<com.fasterxml.jackson.databind.JsonNode>- Overrides:
applyin classBodyParser.MaxLengthBodyParser<com.fasterxml.jackson.databind.JsonNode>- Parameters:
request- The request to create the body parser for.- Returns:
- The accumulator to parse the body.
-