JSR-353 : Java API For Processing JSON - Java Community Process

1y ago
18 Views
2 Downloads
983.31 KB
22 Pages
Last View : 4d ago
Last Download : 3m ago
Upload by : Kairi Hasson
Transcription

Insert Picture Here JSR-353 : Java API for Processing JSON Jitendra Kotamraju

The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracleʼs products remains at the sole discretion of Oracle. 2

Agenda Overview JAX-RS Usage Standardization 3

Overview JSON JSON is a light-weight data exchange format – Easy for humans/machines to read and write – For e.g.: {"name":"Bob", "age":20, "phone":["276 1234", "123 4567"]} JSON is used by popular web sites in their RESTful web services – Facebook, Twitter, Amazon, – Twitter Streaming API discontinues XML 4

Overview JSON usages Policy in Amazon SQS { . "Statement": { "Effect": "Allow", "Principal": { "AWS": "123456789012” }, "Action": "sqs:SendMessage", "Resource": "/987654321098/queue1" } } 5

Overview JSON usages Followers in Twitter API { "previous cursor": 0, "ids": [143206502, 143201767, 777925], "previous cursor str": "0", . } 6

JAX-RS XML Usage JAX-RS applications handle XML using JAXP API @Produces(“application/xml”) public Source getBook(String id) { return new StreamSource( ); } 7

JAX-RS XML Usage JAX-RS applications handle XML using JAXB API @Produces(“application/xml”) public Book getBook(String id) { return new Book( ); } 8

JAX-RS DataBinding JAX-RS content negotiation @Produces({“application/xml”, “application/json”}) public Book getBook(String id) { return new Book(); } XML JAX-RS Book JSON 9

JAX-RS JSON Solutions & Limitations A custom MessageBodyWriter that converts to JSON – JSONObject (For e.g. json.org’s API) JSON – JAXB StAX JSON (For e.g. using jettison) – POJO/JAXB JSON (For e.g. using jackson, eclipseLink etc.) No standard API Some solutions have technical limitations Applications/Frameworks need to bundle the libraries 10

Standard API Advantages Application can use standard types Leaner, portable applications 11

Standard API Contents Parsing/Processing JSON Data binding : JSON text - Java Objects Two JSRs: Processing/Parsing (JSON-P), Binding (JSON-B) – Similar to JAXP and JAXB – Close collaboration between the two 12

Java API for Processing JSON (JSON-P) JSR-353 Streaming API to produce/consume JSON – Similar to StAX API in XML world Object model API to represent JSON – Similar to DOM API in XML world Align with Java EE 7 schedules JSR Supporters – fasterxml.com(Jackson), Doug Crockford(json.org) 13

JSR-353 : Status Here Source: http://blogs.oracle.com/darcy/entry/pictorial jcp 14

JSR-353 Transparency Open Source Project json-processing-spec java.net open source project is used for JSR-353 Mailing lists: – users@json-processing-spec.java.net – jsr353-experts@json-processing-spec.java.net Issue Tracker: – http://java.net/jira/browse/JSON PROCESSING SPEC 15

Resources http://json-processing-spec.java.net 16

Q&A 17

Parsing API JSON Grammar Source: http://json.org 18

Parsing API JSON Grammar Source: http://json.org 19

JSR-353 API Processing API API initial proposal to EG – Based visitor pattern (similar to ASM, JSR 269 API, ) – Works nicely with streaming and tree API – Providers plug-in their implementations 20

JSR-353 API UML class diagram 21

22

Java API for Processing JSON (JSON-P) Streaming API to produce/consume JSON - Similar to StAX API in XML world Object model API to represent JSON - Similar to DOM API in XML world Align with Java EE 7 schedules JSR Supporters - fasterxml.com(Jackson), Doug Crockford(json.org) JSR-353

Related Documents:

JAX-RS 1.0 Connectors 1.6 JAX-WS 2.2 JAXB 2.2 JSR-109 1.2 JSR-181 1.1 JMS 1.1 JAF 1.1 JavaMail 1.4 JSR-115 JSR-196 JSR-88 1.2 JSR-77 1.1 JAX

Technology Compatibility Kit Reference Guide for JSR 346: Contexts and Dependency Injection for Java EE 1.1 Specification Lead: Red Hat Inc. Pete Muir JSR 346: Contexts and Dependency Injection (CDI) for Java EE 1.1 specification lead Gavin King JSR 299: Contexts and Dependency Injection (CDI) for Java EE 1.0 specification lead Martin Kouba .

java.io Input and output java.lang Language support java.math Arbitrary-precision numbers java.net Networking java.nio "New" (memory-mapped) I/O java.rmi Remote method invocations java.security Security support java.sql Database support java.text Internationalized formatting of text and numbers java.time Dates, time, duration, time zones, etc.

Java Version Java FAQs 2. Java Version 2.1 Used Java Version This is how you find your Java version: Start the Control Panel Java General About. 2.2 Checking Java Version Check Java version on https://www.java.com/de/download/installed.jsp. 2.3 Switching on Java Console Start Control Panel Java Advanced. The following window appears:

Technology Compatibility Kit Reference Guide for JSR-299: Context and Dependency Injection for Java EE Specification Lead: Red Hat Inc. Gavin King JSR-299: Contexts and Dependency Injection (CDI) for Java EE specification lead (Red Hat, Inc.) Pete Muir CDI TCK lead (Red Hat, Inc.) Dan Allen CDI TCK developer (Red Hat, Inc.)

programmer only deals with the Java filesystem API. The virtual machine then handles translating between this “virtual” API to the true operating system API (see diagram B-2). What is Java? Part 3: Java Applets and Java Web Start Beyond the language, compiler, virtual machine and API, Java has a number of ancillary technolo-gies that .

Bruksanvisning för bilstereo . Bruksanvisning for bilstereo . Instrukcja obsługi samochodowego odtwarzacza stereo . Operating Instructions for Car Stereo . 610-104 . SV . Bruksanvisning i original

vi 6 4kÚezpÜhªÔ ã 15 7 4kÚeypã[njªÔ ã 16 h p 8Ù it hcÕ ã hÔ Ý 1 zià[ yj³Ý 17 2 zetãp[njÝ 17 3 4 Üyh³Ý p[njÝ 18