Skip to content

path in query cannot address array elements #52

Open

Description

@jogu

DataElementDef.path is [ + tstr ] in the core CDDL. For SD-JWT VC that means a path can only walk JSON object keys; it cannot select an element of an array claim or "all elements" of one. OpenID4VP's claims path pointer allows strings, null (all elements of the current array) and non-negative integers (a specific index) for this, and SD-JWT VC claim metadata uses the same path syntax, so array claims that are common in SD-JWT VCs (e.g. nationalities, address arrays) are not requestable with the current type.

We could widen the type to [ + (tstr / null / uint) ] and give each format definition the semantics of the non-string elements? (mdoc would continue to only use the two-string form).

Raised while moving the format-specific details into annexes (#21 / #22); the SD-JWT VC annex carries an editor's note pointing at this issue.

Activity

  1. GarethCOliver commented on Oct 7, 2026

    @GarethCOliver
    Collaborator

    Proposal makes sense to me, we should be consistent with existing matching logic unless there is a strong reason to deviate (and having some mechanism to specify into arrays is necessary).

    I would say that indexing is mostly not usable from a querying perspective (because I don't generally know the contents of an array when I'm making the query), but 'all-of' is necessary and there might be odd cases where indexing is needed.

  2. martijnharing commented on Oct 8, 2026

    @martijnharing
    Collaborator

    I'm not a big fan of the approach to query within structures, but it's a feature that's used so we should support it.
    The case for value matching is a lot clearer, although I'm not certain if we should use the same path structure. We should discuss that as part of the value matching mechanism.

    To address this specific issue, each format has to define the meaning of the path element and we shouldn't limit the path array itself to much. Actually allowing any is a bit too much. I propose to say Path = [ + tstr / int / null / bool / bstr] as reasonable things that a path could use.

  3. awoie commented on Nov 5, 2026

    @awoie
    Contributor

    WG discussion:

    • Proposal is: Path = [ + tstr / int / null / bool / bstr]; no objection.
    • @martijnharing to create an issue on subclaims matching if they are not present.
  4. jogu commented on Nov 9, 2026

    @jogu
    ContributorAuthor

    Discussed on 9th Nov call - Christian offered to do a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions