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

  • Java EE 8 and Angular
  • Prashant Padmanabhan
  • 320字
  • 2021-07-02 19:22:32

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.

主站蜘蛛池模板: 广汉市| 南投县| 陈巴尔虎旗| 新宾| 天峻县| 海淀区| 澄迈县| 徐汇区| 化隆| 沐川县| 房山区| 武夷山市| 渭南市| 漯河市| 安达市| 阳西县| 宁强县| 兰西县| 温州市| 黄石市| 炉霍县| 玉树县| 英超| 通许县| 清镇市| 定陶县| 九寨沟县| 彩票| 龙江县| 颍上县| 平和县| 祁门县| 西丰县| 汾西县| 宜春市| 台安县| 西乌珠穆沁旗| 明光市| 西安市| 四川省| 乌兰察布市|