Disable GensonJaxRSFeature in resteasy web.xml
cengizkrbck opened this issue · 5 comments
Hi,
In documentation/Extensions/JaxRs disabling genson explained. But it is for jersey.
Is there any way to disable GensonJaxRSFeature in web.xml at resteasy application.
Our rest interface heavily depend on the Jackson, but also we need&like genson when class serialization & deserialization, so we can not remove it from dependencies.
resteasy selects a json-converter-provider from dependencies automatically.
Any help or pr really appreciated. @EugenCepoi
ps: i am also working with this but i am so newbie in resteasy&jaxrs stuff.
Are you doing this?
If so in the application code you can implement getSingletons and return a set containing an instance of new GensonJaxRSFeature().disable()
. Just like in the documentation.
If you have a question please first use the google group http://groups.google.com/group/genson or the gitter room https://gitter.im/owlike/genson.
Hi @EugenCepoi ,
Sorry for inconvenience about issue posting, but i think disabling support with web.xml may be good feature.
Then, I tried your suggestion;
`public class MyApplication extends javax.ws.rs.core.Application{
@Override
public Set<Object> getSingletons()
{
Set<Object> resources = new java.util.HashSet<>();
resources.add(new GensonJaxRSFeature().disable());
return resources;
}
}`
and in web.xml
`init-param
_param-name>javax.ws.rs.Application</param-name_
_param-value>com.exchange.admin.web.services.application.MyApplication</param-value_
_/init-param_`
It still uses genson to parse over jackson.
Np. Do you have a simplified version of your web.xml? Or even better would be a mavenized example that I can run to test it.
Sent from my iPhone
On Nov 18, 2016, at 12:13 AM, cengizkrbck notifications@github.com wrote:
Hi Eugen,
Sorry for inconvenience about issue posting, but i think disabling support with web.xml may be good feature.
Then, I tried your suggestion;
`public class MyApplication extends javax.ws.rs.core.Application{@OverRide
public Set getSingletons()
{
Set resources = new java.util.HashSet<>();
resources.add(new GensonJaxRSFeature().disable());
return resources;
}
}
and in web.xmljavax.ws.rs.Application
com.exchange.admin.web.services.application.MyApplication
`It still uses genson to parse over jackson.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
I don't see anything wrong in here, a runnable example would be helpful.