Hi i think json is not yet standardized but you can use jaxb to do so through jaxrs providers. it means youll need to bring some classes in your code but it will be portable
*Romain Manni-Bucau* *Twitter: @rmannibucau* *Blog: http://rmannibucau.wordpress.com* *LinkedIn: http://www.linkedin.com/pub/romain-manni-bucau/43/544/956* 2012/9/20 Alex The Rocker <[email protected]> > Hello, > > I have a requirement to build a web application with JSON web services and > which must be portable accross Apache TomEE+ "next GA release = 1.5 ?", IBM > WebSphere 8.5 and ORACLE WebLogic 12c. > I'd like to use pure Java EE 6 APIs to make portability simple. > > I am currently confused by JAX-RS 1.1 : appart from Java EE 6’s > javax.ws.rs.core.MediaType.APPLICATION_JSON constant, I don't find much > about JSON in JAX-RS specifications. > > Is there a way to control which JSON notation is generated by JAX-RS web > services in TomEE+ ? > > Note : uou will find in this link : > > http://jersey.java.net/nonav/documentation/latest/json.html#d4e949 > > a description of the Various JSON Notation (at least from a Jersey point of > view) > > For example, is NATURAL notation supported by JSON implementation in TomEE+ > ? > > If the generated JSON depends on which application server my application is > deployed, then it'd make impossible writing with single source code, I'm > afraid... isn't it ? > > Thanks, > Alex. >
