geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1770999 - /geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
Date Wed, 23 Nov 2016 16:22:52 GMT
Author: struberg
Date: Wed Nov 23 16:22:51 2016
New Revision: 1770999

URL: http://svn.apache.org/viewvc?rev=1770999&view=rev
Log:
GERONIMO-6558 JavaDoc for MergePatch stuff

Modified:
    geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java

Modified: geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java?rev=1770999&r1=1770998&r2=1770999&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
(original)
+++ geronimo/specs/trunk/geronimo-json_1.1_spec/src/main/java/javax/json/spi/JsonProvider.java
Wed Nov 23 16:22:51 2016
@@ -254,7 +254,30 @@ public abstract class JsonProvider {
      * Applying this JsonPatch to the source will give you the target.
      * A mergePatch is a JsonValue as defined in http://tools.ietf.org/html/rfc7396
      *
+     * If you have a JSON like
+     * <pre>
+     * {
+     *   "a": "b",
+     *   "c": {
+     *     "d": "e",
+     *     "f": "g"
+     *   }
+     * }
+     * </pre>
+     *
+     * Then you can change the value of "a" and removing "f" by sending:
+     * <pre>
+     * {
+     *   "a":"z",
+     *   "c": {
+     *     "f": null
+     *   }
+     * }
+     * </pre>
+     *
      * @see #createPatch(JsonStructure, JsonStructure)
+     * @see #mergePatch(JsonValue, JsonValue)
+     *
      * @since 1.1
      */
     public abstract JsonValue createMergePatch(JsonValue source , JsonValue target);
@@ -264,6 +287,8 @@ public abstract class JsonProvider {
      * A mergePatch is a JsonValue as defined in http://tools.ietf.org/html/rfc7396
      *
      * @return the result of applying the patch to the source
+     *
+     * @see #createMergePatch(JsonValue, JsonValue)
      * @since 1.1
      */
     public abstract JsonValue mergePatch(JsonValue source, JsonValue patch);



Mime
View raw message