-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
-
None
The JsonBindingProvider has the following annotations:
@Produces({"application/json", "application/*+json", "text/json", "*/*"}) @Consumes({"application/json", "application/*+json", "text/json", "*/*"})
And then we have this code checking it has something to do with JSON in the end:
public static boolean isSupportedMediaType(final MediaType mediaType) { return mediaType.getSubtype().equals(JSON) || mediaType.getSubtype().endsWith(PLUS_JSON); }
I think we should be consistent with the ResteasyJackson2Provider in which we restricted the matches (compared to the provider provided by Jackson):
@Consumes({"application/json", "application/*+json", "text/json"}) @Produces({"application/json", "application/*+json", "text/json"})
By the way, it's not just about being consistent, if the provider is registered for /, I can't eliminate it from the global candidates even if I'm just working with XML if I end up having this provider in the classpath.
And if we need to support more, we can still push more things there (and probably keep the list consistent between JSON-B and Jackson).
- is related to
-
RESTEASY-2107 Unable to use Bean Validation with JSON-B
- Resolved