The answer was surprisingly simple. I had to add a Content-Type
header in the POST
request with a value of application/json
. Without this header Jersey did not know what to do with the request body (in spite of the @Consumes(MediaType.APPLICATION_JSON)
annotation)!
More Related Contents:
- How can I customize serialization of a list of JAXB objects to JSON?
- How to reuse Jersey’s JSON/JAXB for serialization?
- Jersey 415 Unsupported Media Type
- SEVERE: MessageBodyWriter not found for media type=application/json, type=class com.jersey.jaxb.Todo, genericType=class com.jersey.jaxb.Todo
- Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String
- Spring boot Jersey Jackson
- Parsing JSON with Unix tools
- How to escape special characters in building a JSON string?
- Importing local json file using d3.json does not work
- JSON Invalid UTF-8 middle byte
- JSON Naming Convention (snake_case, camelCase or PascalCase) [closed]
- Could not load file or assembly ‘Newtonsoft.Json’ or one of its dependencies. Manifest definition does not match the assembly reference
- Unix command-line JSON parser? [closed]
- How to serialize or convert Swift objects to JSON?
- How do I use the Jersey JSON POJO support?
- Unmarshaling json in Go: required field?
- UnicodeDecodeError: ‘utf8’ codec can’t decode byte 0x80 in position 3131: invalid start byte
- Downloading JSON with NSURLSession doesn’t return any data
- How to fetch data from local JSON file on react native?
- Standard way of referencing an object by identity (for, eg, circular references)?
- List of Language Codes in YAML or JSON? [closed]
- How to return a partial JSON response using Java?
- How to generate JSON response from JSF?
- Flutter Registration with API
- VB.net JSON Deserialize
- Why does Boost property tree write_json save everything as string? Is it possible to change that?
- How to save an array as a json file in Swift?
- Type ‘{}’ is not assignable to type ‘IntrinsicAttributes & IntrinsicClassAttributes
- Register/login user with WordPress JSON API
- How to dynamically display a multiline text in D3.js?