Hi Chamila, These null value issues should be fixed in the latest DSS 3.2.2. The GSON based builder/formatter basically give extended functionality for proper formatting of JSON data. That is, first, it supports handling different data types, numbers and strings properly, where earlier, it only supported strings. And also, it can return the output document in an consistent way, where in the result set, if you have multiple entries or one, it will always return an array, where as, the other implementation switches to a non-array representation when the result only contains a single entry, so the output is not consistent. This is possible in the GSON based one, because it is schema aware, where it actually looks up the associated XML schema of the service and determines how the JSON output should be. And of course, lastly, it streams, rather than building the full message in memory.
Cheers, Anjana. On Fri, Dec 5, 2014 at 12:36 PM, Chamila De Alwis <[email protected]> wrote: > Hi, > > I noticed that to query a datasource with null values via a REST service > in DSS, I have to switch message formatter and message builder for > application/json to org.apache.axis2.json.* libraries in axis2.xml. > > Are there any tradeoffs between these libraries and the gson based > libraries, noticeable on the functionality level? > > If there are minor differences, why not enable them by default, and leave > the gson based libraries as optional? > > > Regards, > Chamila de Alwis > Software Engineer | WSO2 | +94772207163 > Blog: code.chamiladealwis.com > > > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Anjana Fernando* Senior Technical Lead WSO2 Inc. | http://wso2.com lean . enterprise . middleware
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
