Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2884 Update JMAP implementation to conform to RFC 8620/8621
  3. JAMES-3677

BackReference should allow pointing to specific array elements

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.6.0
    • 3.7.0
    • JMAP
    • None

    Description

      Today James support JMAP BackReferences to allow compose JMAP method calls together within a single JMAP request in order to reduce roundtrips, a la graphQL.

      https://jmap.io/spec-core.html#references-to-previous-method-results specify the mechanism: a JSON pointer allow extracting the JSON value to supply from a previously executed method response. It clearly state that https://datatracker.ietf.org/doc/html/rfc6901 should be respected. RFC-6901 allow pointing toward dedicated array items:

      Given
      
         {
            "foo": ["bar", "baz"],
            ...
         }
      
         The following JSON strings evaluate to the accompanying values:
          
          ...
          "/foo/0"       "bar"
          ...
      

      However this is not currently supported by James.

      Confusion arrise from the fact that JMAP relies on JSON pointers for updates too and forbids to do partial updates. However no such limitation is stated in the context of back references.

      Thus, in a spec compliance effort, we shall allow pointing back-references to items in arrays.

      Attachments

        Issue Links

          Activity

            People

              aduprat Antoine Duprat
              btellier Benoit Tellier
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h 50m
                  2h 50m