It is expected that use of the JsonP API will largely replace use of IBM's JSON4J classes, which were an earlier set of java tools for this purpose... but the two differ enough that it's possible both will remain in use.
Currently supported demonstrations:
And just for fun, toy routines to convert between JSON and JinX (an ad-hoc "JSON in XML" syntax). This demonstrates both tree-walking the JSON model and more complicated programmatic construction.
This sample can be installed onto runtime versions 18.104.22.168 and later.
Online installation (requires 22.214.171.124 or later):
installUtility install JsonPSample
Any missing features required by the server will be installed for you.
JsonPSample.jarusing the download button at the top of the page and place it in the root of your server installation.
java -jar JsonPSample.jar
Any missing features required by the server will need to be installed separately.
To run the jsonp application:
bindirectory in the Liberty profile installation:
server run JsonPSample
CWWKZ0001I: Application jsonp started in XX.XX seconds.
JsonP Servlet - Basic demonstration of JSR353 (JSON Processing) support.followed by an introductory page describing the examples and providing links to each of them. To return to this "home page", click the
Return to /jsonp menulink at the bottom of each of these pages.
jsonp.war file contains the source and binaries for the application, and can be used to import it to Eclipse.
The application is automatically installed because it is located in the server dropins directory. Any number of applications can be installed from this location.