@Test public void givenPath_copyToTargetPath() throws Exception { JsonPatchExample jsonPatchExample = new JsonPatchExample(); JsonObject jsonObject = jsonPatchExample.copy(); JsonPointer pointer = Json.createPointer("/series/0"); JsonString jsonString = (JsonString) pointer.getValue(jsonObject); assertThat(jsonString.getString()).isEqualToIgnoringCase("Cognitive"); }
public JsonObject copy() { JsonPatchBuilder builder = Json.createPatchBuilder(); JsonPatch jsonPatch = builder.copy("/series/0", "/topics/0").build(); return jsonPatch.apply(jsonObject); }
JsonPatchExample extends JsonExample { public JsonObject copy() { JsonPatchBuilder builder = Json.createPatchBuilder(); JsonPatch jsonPatch = builder.copy("/series/0", "/topics/0").build(); return jsonPatch.apply(jsonObject); } }
JsonPatchExample extends JsonExample { public JsonObject copy() { JsonPatchBuilder builder = Json.createPatchBuilder(); JsonPatch jsonPatch = builder.copy("/series/0", "/topics/0").build(); return jsonPatch.apply(jsonObject); }  }
JsonPatchExample extends JsonExample { public JsonObject copy() { JsonPatchBuilder builder = Json.createPatchBuilder(); JsonPatch jsonPatch = builder.copy("/series/0", "/topics/0").build(); return jsonPatch.apply(jsonObject); }  String replace(); JsonObject addAndRemove(); JsonObject move(); JsonObject copy(); JsonObject test(); JsonObject toJsonArray(); }
JsonPatchExample extends JsonExample { public JsonObject copy() { JsonPatchBuilder builder = Json.createPatchBuilder(); JsonPatch jsonPatch = builder.copy("/series/0", "/topics/0").build(); return jsonPatch.apply(jsonObject); }  String replace(); JsonObject addAndRemove(); JsonObject move(); JsonObject copy(); JsonObject test(); JsonObject toJsonArray();  }