[
   {
        "given": { "foo": "bar"},
        "cases": [
             {
                "comment" : "add -> add -> add -> fail",
                "patch": [
                     { "op": "add", "path": "/baz", "value": "qux" },
                     { "op": "add", "path": "/foo", "value": [ "bar", "baz" ] },
                     { "op": "add", "path": "/baz/bat", "value": "qux" } // nonexistent target
                 ],
                "error" : "fail"
             }
         ]
    },
    {
        "given": {
               "baz": "boo",
               "foo": [ "bar", "qux", "baz" ]
           },
        "cases": [
             {
                "comment" : "add -> remove -> remove -> fail",
                "patch": [
                     { "op": "add", "path": "/baz", "value": "qux" },
                     { "op": "remove", "path": "/foo/2" },
                     { "op": "remove", "path": "/foo/2" } // nonexistent target
                 ],
                "error" : "fail"
             }
         ]
    },
    {
        "given": {
               "baz": ["boo"],
               "foo": [ "bar", "qux", "baz" ]
           },
        "cases": [
             {
                "comment" : "add -> add -> fail",
                "patch": [
                     { "op": "add", "path": "/baz/-", "value": "xyz" },
                     { "op": "add", "path": "/baz/3", "value": "wxy" }
                 ],
                "error" : "fail"
             },
             {
                "comment" : "add -> move -> copy -> replace -> remove -> fail",
                "patch": [
                     { "op": "add", "path": "/baz/-", "value": "xyz" },
                     { "op": "move", "from": "/foo/1", "path" : "/baz/-" },
                     { "op": "copy", "from": "/baz/0", "path" : "/foo/-" },
                     { "op": "replace", "path": "/foo/2", "value" : "qux" },
                     { "op": "remove", "path": "/foo/3" } // nonexistent target
                 ],
                "error" : "fail"
             }
         ]
    }
]
