Yep, as stated on johnzon website: " Note: Wildcard providers are basically the same as other provider but instead of application/json they support */json, */*+json, */x-json, */javascript, */x-javascript. This split makes it easier to mix json and other MediaType in the same resource (like text/plain, xml etc since JAX-RS API always matches as true wildcard type in some version whatever the subtype is). "
Means sometimes */json = */* for JAXRS Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2016-02-25 15:34 GMT+01:00 ravi <[email protected]>: > Hi Romain, > > If tomee has supports for custom json types like > application/vnd.comp.v1+json, > application/vnd.comp.v1x-json.. > out of the box then it will be really good > > Sorry for bothering you, I am just going through your code and trying to > understand. > * > In version 0.9.0 I understand that the below code might cause problems* > @Provider > @Produces(WILDCARD) '*/*' > @Consumes(WILDCARD) '*/*' > public class JohnzonProvider<T> extends DelegateProvider<T> { > > } > > > > *fix:https://issues.apache.org/jira/browse/JOHNZON-51 > It has been modified in version 0.9.1 (Commit : JOHNZON-51 making jaxrs > provider specific to json)* > > *The fix in 0.9.1 still supports custom content types like > application/vnd.comp.v1+json, > application/vnd.comp.v1x-json etc.. and my code works fine.* > > @Provider > @Produces({ > "application/json", "*/json", > "*/*+json", "*/x-json", > "*/javascript", "*/x-javascript" > }) > @Consumes({ > "application/json", "*/json", > "*/*+json", "*/x-json", > "*/javascript", "*/x-javascript" > }) > public class JohnzonProvider<T> extends DelegateProvider<T> { > }* > > But again in version 0.9.2 the Johnzon provider is changed to not to > support > custom json content types* > > @Provider > @Produces("application/json") > @Consumes("application/json") > public class JohnzonProvider<T> extends DelegateProvider<T> { > } > > Is there any specific reason to not to support custom json content types > from version 0.9.2 onwards? > > Thanks, > Ravi > > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Tomee-7-0-0-M2-JaxRs-Client-No-message-body-reader-has-been-found-for-class-ContentType-application-n-tp4677664p4677680.html > Sent from the TomEE Users mailing list archive at Nabble.com. >
