This is on Tomee plume 7.1: I'm having trouble telling Johnzon to not generate json for methods. I have this class:
public class CheckUnqID { @JohnzonProperty("UniqueID") private String UniqueID; public String getUniqueID() { return this.UniqueID; } public void setUniqueID(final String uniqueID) { this.UniqueID = uniqueID; } } The service I am talking to wants the field UniqueID to start with an uppercase U (all of its fields in other resources have upper case first letters). This is the JSON that gets generated when doing a POST: {"UniqueID":"hankventure1","uniqueID":"hankventure1"} I've been trying to configure johnzon to only use fields. Based on the docs at https://johnzon.apache.org/index.html I have this: resources.xml <?xml version="1.0" encoding="UTF-8"?> <resources> <Service id="johnzon" class-name="org.apache.johnzon.jaxrs.ConfigurableJohnzonProvider"> accessModeName = field pretty = true </Service> </resources> openejb-jar.xml <?xml version="1.0" encoding="UTF-8"?> <openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1"> <pojo-deployment class-name="jaxrs-application"> <properties> cxf.jaxrs.providers = johnzon,org.apache.openejb.server.cxf.rs.EJBAccessExceptionMapper cxf.jaxrs.skip-provider-scanning = true </properties> </pojo-deployment> </openejb-jar> I can see tomee reading the resources.xml as it deploys the app Apr 19, 2019 8:24:19 AM org.apache.openejb.config.ConfigurationFactory configureService INFO: Configuring Service(id=johnzon, type=Service, provider-id=johnzon) Apr 19, 2019 8:24:19 AM org.apache.openejb.config.ConfigurationFactory configureService FINE: [accessModeName=field] Apr 19, 2019 8:24:19 AM org.apache.openejb.config.ConfigurationFactory configureService FINE: [pretty=true] and yet it doesn't ever seem to get used. Is there some other configuration I'm missing? Also, is there some way to simply tell johnzon to use my field name exactly as is without needing to tag each one with @JohnzonProperty? -- Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html