0

Is there any way to provide Custom TypeConverter in resteasy-jettison? By default jettison parse String value into int if it contains only numbers... I need to change it.

With clean jettison, there is possibility to write own implementation of TypeConverter (described in jettison user's guide... But I have no Idea where could I update jettison configuration with such class.

4

1 回答 1

0

将系统属性设置为以下类。

System.setProperty("jettison.mapped.typeconverter.class", "org.codehaus.jettison.mapped.SimpleConverter");

所以 jettison 有一个简单的转换器,它总是将值输出为字符串。

于 2013-05-23T13:04:09.910 回答