Here is a sample JSON document file called emp-array.json, which contains the JSON array of the employee objects. The content of the file is as follows:
[ {"employeeId":100,"firstName":"John","lastName":"Chen",
"email":"[email protected]","hireDate":"2008-10-16"},
{"employeeId":101,"firstName":"Ameya","lastName":"Job",
"email":"[email protected]","hireDate":"2013-03-06"},
{"employeeId":102,"firstName":"Pat","lastName":"Fay",
"email":"[email protected]","hireDate":"2001-03-06"} ]
javax.json.JsonValue does not have a DATE ValueType. In the previous example, hireDate will be treated as a STRING type, so handling of DATE values requires explicit parsing as per the date format.
We will use this emp-array.json file as the input source for many examples that we will discuss later in this chapter. By now, you should have a fairly good understanding of the JSON syntax. We will later learn the various techniques for processing JSON data.