官术网_书友最值得收藏!

JSON Processing 1.1

Most languages provide support for reading and writing text files. But when it comes to special types of documents such as XML, CSV, or JSON, processing requires handling them differently to traditional text files. Java has historically had support for XML-based, documents but the support for JSON was provided via third-party libraries. JSON itself is a lightweight data-interchange format which is a well documented standard and has become extremely successful; it has become the default format for many systems. Java had the support for processing XML documents using Java API for XML Processing (JAXP) and JSON-P, which was introduced in Java EE 7. You can now process JSON documents as well. So, JSON-P does for JSON what JAXP does for XML. The 1.1 version was an update to the earlier JSON-P specification called JSON-P 1.0. This was to keep it updated with the JSON IETF standards. While this might sound like the other JSONP (notice the lack of hyphen), which stands for JSON with Padding, this is not that. JSONP is a format used to deal with cross origin AJAX calls using GET, while JSON-P is the specification defined within Java EE, used for JSON Processing and written as JSON-P.

When dealing with any Java EE API, you would have a public API and a corresponding reference implementation. For JSON-P, here are some useful references:

The API includes support for parsing, generating, and querying JavaScript Object Notation data. This is made possible using the object model or the streaming model provided by the JSON-P API. You can consider this a low-level API, which is different to the higher level declarative JSON binding API which is also part of Java EE 8. The streaming model can be considered similar to StAX for XML for creating and reading JSON in a streaming manner, while the object model can be used to work with JSON, similar to DOM for XML.

主站蜘蛛池模板: 长兴县| 锦州市| 石棉县| 宿松县| 莫力| 杂多县| 吐鲁番市| 衢州市| 靖西县| 马龙县| 合水县| 普洱| 广饶县| 陕西省| 高要市| 崇州市| 三都| 娱乐| 祁门县| 定边县| 怀柔区| 乐至县| 栖霞市| 长海县| 同仁县| 石泉县| 乌拉特后旗| 会理县| 赣州市| 墨脱县| 无为县| 贡觉县| 周宁县| 阿勒泰市| 滁州市| 玉田县| 宁强县| 新兴县| 衡山县| 乌兰察布市| 牡丹江市|