OASIS Open Data Protocol (OData) TC

 View Only

Fwd: JSON Path vs. Pointer

  • 1.  Fwd: JSON Path vs. Pointer

    Posted 03-06-2024 17:13
    Edited by Stefan Hagen 03-06-2024 17:14
    Dear members interested in JSON Path or Pointer,
    I have no facts to add to the discussion during the meeting today.
    I would be surprised if we could gain benefits from mixing JSON Path and Pointer.
    Citing from a random fresh email of Greg Dennis:
    > The purpose of JSON Path is to query JSON data.
    > The purpose of JSON Pointer is to indicate a single location (or potential location) within JSON data.
                                   -- https://mailarchive.ietf.org/arch/msg/jsonpath/rYam8AL86lIWPO4wrS4QFbefbc8/
    My instinct is that for some patch like operations JSON Pointer might be perfect.
    Like specifying an append at the end of an array or similar.
    I think JSON Path is a better match for the query and value functions
    that try to include existing implementations.
    But, I may be wrong. I myself, often model interfaces per JSON Schema,
    and I use a hammer for forcing a screw into wood.
    So, looking forward to see the JSON Pointer formulation or compare notes.
    Cheers,
    Stefan.
    ---
    Stefan Hagen, Emmetten, Nidwalden, Switzerland.