Loading ...
Sorry, an error occurred while loading the content.

JSON Patch Internet-Draft 02

Expand Messages
  • Paul C. Bryan
    I ve posted the third draft of the JSON Patch Internet-Draft to the IETF: http://tools.ietf.org/html/draft-pbryan-json-patch-02 It should address all of the
    Message 1 of 4 , Oct 23, 2011
    • 0 Attachment
      I've posted the third draft of the JSON Patch Internet-Draft to the
      IETF:

      http://tools.ietf.org/html/draft-pbryan-json-patch-02

      It should address all of the outstanding issues that have been raised to
      date. Your feedback is welcome.

      Paul


      [Non-text portions of this message have been removed]
    • Ted Elliott
      Does the value type have to be a string, or does it support the other types, e.g. true/false, numbers, objects, arrays, etc. I believe it should be any valid
      Message 2 of 4 , Dec 1, 2011
      • 0 Attachment
        Does the value type have to be a string, or does it support the other
        types, e.g. true/false, numbers, objects, arrays, etc. I believe it should
        be any valid json. Otherwise it's of limited usefulness. Some examples:

        original document:
        {
        "foo": "bar"
        }

        patch:
        [
        { "add": "/foo/obj", "value": {} },
        { "add": "/foo/obj/bool", "value": true },
        { "add": "/foo/obj/int", "value": 123 },
        { "add": "/foo/obj/dec", "value": 123.12 },
        { "add": "/foo/arr", "value": [] },
        { "add": "/foo/arr/0", "value": "x" }
        ]

        resulting document:
        {
        "foo": "bar",
        "obj": {
        "bool" : true,
        "int": 123,
        "dec": 123.12
        },
        "arr": [ "x" ]
        }


        [Non-text portions of this message have been removed]
      • Ted
        Sorry, messed up the patch portion a little bit. It should be this instead: patch: [ { add : /obj , value : {} }, { add : /obj/bool , value : true }, {
        Message 3 of 4 , Dec 1, 2011
        • 0 Attachment
          Sorry, messed up the patch portion a little bit. It should be this instead:
          patch:
          [
          { "add": "/obj", "value": {} },
          { "add": "/obj/bool", "value": true },
          { "add": "/obj/int", "value": 123 },
          { "add": "/obj/dec", "value": 123.12 },
          { "add": "/arr", "value": [] },
          { "add": "/arr/0", "value": "x" }
          ]


          --- In json@yahoogroups.com, Ted Elliott <elliott.ted@...> wrote:
          >
          > Does the value type have to be a string, or does it support the other
          > types, e.g. true/false, numbers, objects, arrays, etc. I believe it should
          > be any valid json. Otherwise it's of limited usefulness. Some examples:
          >
          > original document:
          > {
          > "foo": "bar"
          > }
          >
          > patch:
          > [
          > { "add": "/foo/obj", "value": {} },
          > { "add": "/foo/obj/bool", "value": true },
          > { "add": "/foo/obj/int", "value": 123 },
          > { "add": "/foo/obj/dec", "value": 123.12 },
          > { "add": "/foo/arr", "value": [] },
          > { "add": "/foo/arr/0", "value": "x" }
          > ]
          >
          > resulting document:
          > {
          > "foo": "bar",
          > "obj": {
          > "bool" : true,
          > "int": 123,
          > "dec": 123.12
          > },
          > "arr": [ "x" ]
          > }
          >
          >
          > [Non-text portions of this message have been removed]
          >
        • Paul C. Bryan
          It supports any value type, including objects and arrays. Paul ... [Non-text portions of this message have been removed]
          Message 4 of 4 , Dec 3, 2011
          • 0 Attachment
            It supports any value type, including objects and arrays.

            Paul

            On Thu, 2011-12-01 at 09:05 -0500, Ted Elliott wrote:

            >
            >
            > Does the value type have to be a string, or does it support the other
            > types, e.g. true/false, numbers, objects, arrays, etc. I believe it
            > should
            > be any valid json. Otherwise it's of limited usefulness. Some
            > examples:
            >
            > original document:
            > {
            > "foo": "bar"
            > }
            >
            > patch:
            > [
            > { "add": "/foo/obj", "value": {} },
            > { "add": "/foo/obj/bool", "value": true },
            > { "add": "/foo/obj/int", "value": 123 },
            > { "add": "/foo/obj/dec", "value": 123.12 },
            > { "add": "/foo/arr", "value": [] },
            > { "add": "/foo/arr/0", "value": "x" }
            > ]
            >
            > resulting document:
            > {
            > "foo": "bar",
            > "obj": {
            > "bool" : true,
            > "int": 123,
            > "dec": 123.12
            > },
            > "arr": [ "x" ]
            > }
            >
            > [Non-text portions of this message have been removed]
            >
            >
            >
            >
            >



            [Non-text portions of this message have been removed]
          Your message has been successfully submitted and would be delivered to recipients shortly.