Using the JSR 374 – Java API for JSON Processing 1.1

JSR 374: Java API for JSON Processing 1.1 supercedes JSR 353: Java API for JSON Processing, to accomplish the following key objectives:

  • Support for JSON Pointer and JSON Patch
  • Add editing/transformation operations to the JSON object model
  • Update the API to work with Java SE 8

These goals are met with the help of the following key APIs mentioned in the JSR:

Interface

Description

javax.json.JsonPointer

This interface represents an immutable implementation of a JSON Pointer, as defined by RFC 6901 (https://tools.ietf.org/html/rfc6901). JSON Pointer can be used to perform the following functions:

  • Add JsonValue at the referenced location in the specified target
  • Replace JsonValue at the referenced location in the specified target with the supplied value
  • Check for the presence of the value in the specified target
  • Fetch JsonValue at the referenced location in the specified target
  • Remove JsonValue at the referenced location in the specified target

javax.json.JsonPatch

This interface represents an immutable implementation of a JSON Patch as defined by RFC 6902 (https://tools.ietf.org/html/rfc6902). 

JSON Patch operates on the target JSON document by applying the add, copy, move, replace, remove, and test  functions.

Refer to the complete list of the object model APIs available in JSR 374 at https://jcp.org/aboutJava/communityprocess/final/jsr374/index.html.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.12.186