@@ -0,0 +1,1715 @@
+package com.readlearncode.hashtag100daysofjavaee8;%0A%0Aimport org.junit.Ignore;%0Aimport org.junit.Test;%0A%0Aimport javax.json.*;%0A%0Aimport java.io.StringReader;%0A%0Aimport static org.assertj.core.api.Java6Assertions.assertThat;%0A%0A/**%0A * Source code github.com/readlearncode%0A *%0A * @author Alex Theedom www.readlearncode.com%0A * @version 1.0%0A */%0Apublic class challenges %7B%0A%0A    @Test%0A    @Ignore%0A    public void givenTargetJSON_whenPatchIsApplied_shouldChangeResult() %7B%0A%0A        JsonValue target = Json.createValue(%22%7B%5C%22colour%5C%22:%5C%22blue%5C%22,%5C%22size%5C%22:10%7D%22);%0A        JsonValue patch = Json.createValue(%22%7B%5C%22colour%5C%22:%5C%22red%5C%22%7D%22);%0A        JsonValue result = Json.createMergePatch(patch).apply(target);%0A%0A        System.out.println(result);%0A%0A        assertThat(((JsonString) result).getString()).isEqualToIgnoringCase(%22%7B%5C%22colour%5C%22:%5C%22red%5C%22%7D%22);%0A    %7D%0A%0A%0A    @Test%0A    public void givenATarget_JSONPointerShouldFindValue() %7B%0A%0A        /* Target JSON document%0A        %7B%0A          %22name%22: %22Duke%22,%0A          %22likes%22: %5B%0A            %22Java%22,%0A            %22Coffee%22%0A          %5D%0A        %7D%0A         */%0A%0A        String target = %22%7B%5C%22name%5C%22:%5C%22Duke%5C%22,%5C%22likes%5C%22:%5B%5C%22Java%5C%22,%5C%22Coffee%5C%22%5D%7D%22;%0A        JsonObject jsonObject = Json.createReader(new StringReader(target)).readObject();%0A        JsonPointer pointer = Json.createPointer(%22/likes/0%22);%0A        jsonObject = pointer.add(jsonObject, Json.createValue(%22Java EE 8%22));%0A        pointer = Json.createPointer(%22/likes/2%22);%0A        JsonObject newJsonObject = pointer.replace(jsonObject, Json.createValue(%22Ice Cream%22));%0A%0A        // What is the shape of the new JSON Object?%0A%0A        assertThat(newJsonObject.toString()).isEqualToIgnoringCase(%22%7B%5C%22name%5C%22:%5C%22Duke%5C%22,%5C%22likes%5C%22:%5B%5C%22Java EE 8%5C%22,%5C%22Java%5C%22,%5C%22Ice Cream%5C%22%5D%7D%22);%0A    %7D%0A%0A%0A%7D

add json processing examples