|
1 | 1 | <html>
|
2 | 2 | <!--
|
3 | 3 |
|
4 |
| - Copyright (c) 2013, 2017 Oracle and/or its affiliates. All rights reserved. |
| 4 | + Copyright (c) 2013, 2019 Oracle and/or its affiliates. All rights reserved. |
5 | 5 |
|
6 | 6 | This program and the accompanying materials are made available under the
|
7 | 7 | terms of the Eclipse Public License v. 2.0, which is available at
|
|
18 | 18 | -->
|
19 | 19 |
|
20 | 20 | <body>
|
21 |
| -The Java API for JSON Processing provides portable APIs to parse, |
| 21 | +Jakarta JSON Processing provides portable APIs to parse, |
22 | 22 | generate, transform, and query <a href="http://json.org/">JSON</a> using the
|
23 | 23 | streaming API or the object model API.
|
24 | 24 |
|
|
41 | 41 | The object model generates JSON output by navigating the entire tree at once.
|
42 | 42 |
|
43 | 43 | <h2>The Streaming API</h2>
|
44 |
| -<p>The streaming API is similar to the StAX API for XML and consists of the |
45 |
| -interfaces {@link javax.json.stream.JsonParser} and |
46 |
| -{@link javax.json.stream.JsonGenerator}. {@code JsonParser} |
47 |
| -contains methods to parse JSON data using the streaming model. |
| 44 | +<p>The streaming API is similar to the StAX API for XML and consists of the |
| 45 | +interfaces {@link javax.json.stream.JsonParser} and |
| 46 | +{@link javax.json.stream.JsonGenerator}. {@code JsonParser} |
| 47 | +contains methods to parse JSON data using the streaming model. |
48 | 48 | {@code JsonGenerator} contains methods to write JSON data to an ouptut source.
|
49 | 49 |
|
50 |
| -<p>{@code JsonParser} provides forward, read-only access to |
51 |
| -JSON data using the pull parsing programming model. In this model the |
52 |
| -application code controls the thread and calls methods in the parser interface |
53 |
| -to move the parser forward or to obtain JSON data from the current state of |
54 |
| -the parser. Refer to |
55 |
| -<a href="javax/json/stream/JsonParser.html#JsonParserExample2">this example</a> |
56 |
| -for more details. |
| 50 | +<p>{@code JsonParser} provides forward, read-only access to |
| 51 | +JSON data using the pull parsing programming model. In this model the |
| 52 | +application code controls the thread and calls methods in the parser interface |
| 53 | +to move the parser forward or to obtain JSON data from the current state of |
| 54 | +the parser. Refer to |
| 55 | +<a href="javax/json/stream/JsonParser.html#JsonParserExample2">this example</a> |
| 56 | +for more details. |
57 | 57 |
|
58 |
| -<p>{@code JsonGenerator} provides methods to write JSON to a stream. The |
| 58 | +<p>{@code JsonGenerator} provides methods to write JSON to a stream. The |
59 | 59 | generator writes name/value pairs in JSON objects and values in JSON arrays.
|
60 |
| -Refer to |
61 |
| -<a href="javax/json/stream/JsonGenerator.html#JsonGeneratorExample3">this |
62 |
| -example</a> for more details. |
| 60 | +Refer to |
| 61 | +<a href="javax/json/stream/JsonGenerator.html#JsonGeneratorExample3">this |
| 62 | +example</a> for more details. |
63 | 63 |
|
64 |
| -<p>The streaming API is a low-level API designed to process large amounts of |
65 |
| -JSON data efficiently. Other JSON frameworks (such as JSON binding) can be |
66 |
| -implemented using this API.</p> |
| 64 | +<p>The streaming API is a low-level API designed to process large amounts of |
| 65 | +JSON data efficiently. Other JSON frameworks (such as JSON binding) can be |
| 66 | +implemented using this API.</p> |
67 | 67 |
|
68 | 68 | <h2>The Object Model API</h2>
|
69 |
| -<p>The object model API is similar to the DOM API for XML. It is a high-level |
70 |
| -API that provides immutable object models for JSON object and array structures. |
71 |
| -These JSON structures are represented as object models using the Java types |
72 |
| -{@link javax.json.JsonObject} and {@link javax.json.JsonArray}. |
73 |
| -{@code JsonObject} provides a {@link java.util.Map} view to access the unordered |
| 69 | +<p>The object model API is similar to the DOM API for XML. It is a high-level |
| 70 | +API that provides immutable object models for JSON object and array structures. |
| 71 | +These JSON structures are represented as object models using the Java types |
| 72 | +{@link javax.json.JsonObject} and {@link javax.json.JsonArray}. |
| 73 | +{@code JsonObject} provides a {@link java.util.Map} view to access the unordered |
74 | 74 | collection of zero or more name/value pairs from the model. Similarly,
|
75 |
| -{@code JsonArray} provides a {@link java.util.List} view to access the ordered |
76 |
| -sequence of zero or more values from the model. |
| 75 | +{@code JsonArray} provides a {@link java.util.List} view to access the ordered |
| 76 | +sequence of zero or more values from the model. |
77 | 77 |
|
78 |
| -<p>The object model API uses builder patterns to create these object models. |
| 78 | +<p>The object model API uses builder patterns to create these object models. |
79 | 79 | Application code can use the interface {@link javax.json.JsonObjectBuilder}
|
80 |
| -to create models that represent JSON objects. The resulting model is of type |
81 |
| -{@code JsonObject}. Refer to |
82 |
| -<a href="javax/json/JsonObjectBuilder.html#JsonObjectBuilderExample1">this example</a> |
| 80 | +to create models that represent JSON objects. The resulting model is of type |
| 81 | +{@code JsonObject}. Refer to |
| 82 | +<a href="javax/json/JsonObjectBuilder.html#JsonObjectBuilderExample1">this example</a> |
83 | 83 | for more details. Application code can use the interface
|
84 |
| -{@link javax.json.JsonArrayBuilder} to create models that represent JSON arrays. |
85 |
| -The resulting model is of type {@code JsonArray}. Refer to |
86 |
| -<a href="javax/json/JsonArrayBuilder.html#JsonArrayBuilderExample1">this example</a> |
87 |
| -for more details. |
| 84 | +{@link javax.json.JsonArrayBuilder} to create models that represent JSON arrays. |
| 85 | +The resulting model is of type {@code JsonArray}. Refer to |
| 86 | +<a href="javax/json/JsonArrayBuilder.html#JsonArrayBuilderExample1">this example</a> |
| 87 | +for more details. |
88 | 88 |
|
89 |
| -<p>These object models can also be created from an input source (such as |
| 89 | +<p>These object models can also be created from an input source (such as |
90 | 90 | {@link java.io.InputStream} or {@link java.io.Reader}) using the interface
|
91 |
| -{@link javax.json.JsonReader}. |
92 |
| -<a href="javax/json/JsonReader.html#JsonReaderExample1">This example</a> shows |
| 91 | +{@link javax.json.JsonReader}. |
| 92 | +<a href="javax/json/JsonReader.html#JsonReaderExample1">This example</a> shows |
93 | 93 | how to read and create an empty {@code JsonArray} model using the interface
|
94 |
| -{@code JsonReader}. Similarly, these object models can be written to an output |
95 |
| -source (such as {@link java.io.OutputStream} or {@link java.io.Writer}) using |
96 |
| -the class {@link javax.json.JsonWriter}. |
97 |
| -<a href="javax/json/JsonWriter.html#JsonWriterExample1">This example</a> shows |
| 94 | +{@code JsonReader}. Similarly, these object models can be written to an output |
| 95 | +source (such as {@link java.io.OutputStream} or {@link java.io.Writer}) using |
| 96 | +the class {@link javax.json.JsonWriter}. |
| 97 | +<a href="javax/json/JsonWriter.html#JsonWriterExample1">This example</a> shows |
98 | 98 | how to write an empty {@code JsonObject} model using the interface
|
99 | 99 | {@code JsonWriter}.
|
100 | 100 |
|
101 | 101 | <h2>JSON Pointer, JSON Patch, and JSON Merge Patch</h2>
|
102 |
| -The Java API for JSON Processing supports the latest standard on |
| 102 | +The Java API for JSON Processing supports the latest standard on |
103 | 103 | <a href="http://tools.ietf.org/html/rfc6901">JSON Pointer</a>,
|
104 | 104 | <a Href="http://tools.ietf.org/html/rfc6902">JSON Patch</a>, and
|
105 | 105 | <a Href="http://tools.ietf.org/html/rfc7396">JSON Merge Patch</a>.
|
106 |
| - |
| 106 | + |
107 | 107 | </body>
|
108 | 108 | </html>
|
0 commit comments