Markdown Version | Session Recording
Session Date/Time: 27 Sep 2022 08:00
JSONPATH
Summary
This interim meeting focused on progressing the JSONPath draft. Key discussions revolved around the structure and terminology of the draft, specifically regarding "starters," "appenders," and "pickers," and the integration of a technical change to allow wildcard pickers. The group also had an extensive discussion on the determinism of node list ordering, particularly for descendant selectors and object member access, aiming to align the specification with common implementation practices that often exhibit non-deterministic behavior. Scheduling for the next steps to meet the IETF 115 deadline was also addressed.
Key Discussion Points
iregexDraft Progress: Theiregexdraft, a dependency for JSONPath, is ready for Working Group Last Call (WGLC). James, a co-editor, committed to shepherding this draft in the coming weeks.- PR258 and Issue 201 (Draft Structure and Terminology):
- The current structure of the draft (reflecting the "atomizing" of selectors into "starters," "appenders," and "pickers") was found to be "acceptably readable and clear" by recent reviewers.
- A significant discussion centered on the terminology for the new structural elements. While "starter" and "appender" were largely accepted, the term "picker" was debated, with suggestions to rename it to "selector" or "accessor." Concerns were raised about overloading terms.
- A technical change to allow the wildcard picker (
*) in all places (e.g., within bracketed syntax) was proposed to simplify the structure. This was deemed a technical change that also enables editorial improvements.
- Picker Semantics (Issue 261):
- Three options for describing picker semantics were presented: 1) Picker acts as a selector given a value, returning a node list (implementation-oriented); 2) Picker acts as a predicate determining child selection; 3) Pickers have semantics only in the context of a selector.
- Extensive debate ensued regarding the "implementation-biased" nature of Option 1 vs. the abstractness of Option 2, and the potential for extensibility issues. The consensus leaned towards Option 1 for its clarity, with the understanding that the specification should explicitly state that the description is for explanatory clarity and not a required implementation method.
- Determinism in Node List Ordering:
- The current draft was seen as "overly deterministic," potentially excluding existing implementations.
- Descendant Selector Ordering: The group discussed allowing breadth-first traversal for descendant selectors, noting that many implementations already do this. This would involve explicit allowance in the spec.
- List Selector and Object Member Ordering: It was acknowledged that JSON itself does not guarantee object member order, and many programming languages (e.g., Go, .NET) have non-deterministic iteration orders for hash-based data structures across repeated runs. The specification needs to reflect this non-determinism, though array element order remains significant.
- Issue 252 (Descendant Selector Includes Self): Consensus was reached that the descendant selector (
..) should include the current node itself as a source for children, aligning with implementation consensus. - Issue 195 (Singular Paths for Filter Expressions): Discussion on whether filter expressions (and related
existsexpressions and comparisons) should only allow singular paths or accommodate non-singular paths. No firm decision was reached, with arguments for both simplicity and avoiding exclusion of use cases. This issue remains open.
Decisions and Action Items
Decisions
iregexShepherding: James will shepherd theiregexdraft for WGLC in the next couple of weeks. If he cannot, he will notify the working group to find an alternative.- PR258 Merging & Wildcard Integration: The current PR (PR258/issue 201), which is largely editorial, will incorporate the technical change to allow the wildcard picker in all places, combining it with the editorial changes.
- Terminology Refinement: Editors will proceed with refining terminology. The approach will involve defining "starter" and changing instances of "selector" to "appender," followed by a secondary commit to change "picker" to "selector," aiming to avoid overloading terms.
- Picker Semantics: The working group will proceed with "Option 1" for Picker semantics (where the Picker receives a value and selects children directly, as currently described in the PR). The specification will explicitly note that this description is for explanatory clarity and not a required implementation.
- "Picker" Terminology: The issue of the term "picker" will be revisited later, but the current approach for semantics will be used for the next draft iteration.
- Descendant Ordering: The specification will be updated to explicitly allow for breadth-first descendant ordering, reflecting existing implementation consensus, while not precluding depth-first.
- Non-Determinism: The specification will clearly state that implementations are not required to be deterministic in object member iteration order or descendant traversal order (allowing for varied results on repeated runs for the same input), with the exception of array element order, which remains significant.
- Determinism Changes Timeline: The changes related to determinism will be addressed after the current PR (with the wildcard and terminology changes) is merged, to avoid delaying the PR.
- Descendant Selector Scope: The descendant selector (
..) will explicitly include the current node ('self') as a source for children to look at, reflecting implementation consensus. - Issue 195 Status: Issue 195 regarding singular vs. non-singular paths in filter expressions will remain open for further discussion.
Action Items
- Glenn: Create a rich set of examples illustrating the range of possible non-deterministic outcomes when combining multi-level expressions, array descendants, and maps, especially with multiple pickers in a descendant node list.
- Carson/Glenn: Summarize the discussion on Issue 195 (singular paths for filter expressions) in the issue tracker.
- Chairs/Secretary: Set up a Doodle Poll for an interim meeting in the week of October 17th.
Next Steps
- James will shepherd the
iregexdraft for WGLC. - Greg will finalize the current PR (PR258), incorporating the wildcard picker change and refining terminology, for merging.
- The working group will address the detailed specification of non-determinism in node list ordering after the current PR is merged.
- A Doodle Poll will be circulated to schedule the next interim meeting in the week of October 17th, with the goal of preparing the JSONPath draft for the IETF 115 internet draft deadline of October 24th.
- Further discussion on Issue 195 (singular paths in filter expressions) is expected.