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

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.

主站蜘蛛池模板: 常山县| 定西市| 宜川县| 汪清县| 和顺县| 尼木县| 南昌县| 同仁县| 梁河县| 商水县| 达拉特旗| 台湾省| 芒康县| 行唐县| 安岳县| 政和县| 甘谷县| 抚松县| 福泉市| 迁西县| 德惠市| 年辖:市辖区| 双桥区| 南宫市| 舒兰市| 北票市| 繁昌县| 宜城市| 桦甸市| 黄浦区| 大冶市| 都昌县| 泸溪县| 宝兴县| 师宗县| 桂阳县| 中方县| 南丰县| 磴口县| 叶城县| 马龙县|