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

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.

主站蜘蛛池模板: 东台市| 定陶县| 米林县| 富源县| 图木舒克市| 荃湾区| 松原市| 荔波县| 昆明市| 融水| 云安县| 汾阳市| 綦江县| 当涂县| 黄山市| 邵武市| 吉首市| 彭阳县| 大兴区| 濉溪县| 荆州市| 宁化县| 茂名市| 无为县| 尚义县| 辽宁省| 深圳市| 城固县| 德兴市| 武宁县| 南皮县| 丰镇市| 扶风县| 汝州市| 黑龙江省| 磐安县| 台江县| 乃东县| 灌云县| 汉寿县| 清徐县|