JavaScript Object Notation (JSON) is a lightweight data-interchange format that is commonly used in web services to send and receive data. Currently, Java web applications use different implementation libraries to consume/produce JSON. JSR-353 introduces the Java API for JSON processing for generating, parsing, transforming, and querying JSON. With standardized JSON API implementation, libraries are not required, which makes the applications more portable. The objective of JSR-353 is to provide JSON APIs to produce/consume streaming JSON and to build a Java object model for JSON. Support for Java API for JSON has been added to Java EE 7. In this chapter, we will discuss support for generating and parsing JSON. This chapter has the following sections:
We need to download and install the following software:
wildfly-8.1.0.Final.zip
from http://wildfly.org/downloads/.Set the JAVA_HOME
, JBOSS_HOME
, and MAVEN_HOME
environment variables Add %JAVA_HOME%/bin
, %MAVEN_HOME%/bin
, and %JBOSS_HOME%/bin
to the PATH
environment variable.
Create a WildFly 8.1.0 runtime as discussed in Chapter 1, Getting Started with EJB 3.x.
3.17.205.232