Skip to content

One JSON-LD term parser for values, where patterns and SPARQL parameters #2033

Open

Description

@bplatz

Three places turn a JSON-LD term ("x", {"@id": …}, {"@value": …, "@type": …}, {"@value": …, "@language": …}) into an RDF term, each with its own rules:

  • the JSON-LD values clause: fluree-db-query/src/parse/values.rs (parse_values_cell and the functions it calls)
  • value objects in JSON-LD where patterns: fluree-db-query/src/parse/node_map.rs (parse_value_object)
  • SPARQL parameters: fluree-db-sparql/src/params.rs (Value::parse)

They have disagreed on "@type": "@id", vector @value arrays and blank-node labels. #2024 aligned the parameter parser on those three, but nothing keeps the three in step, and each new form has to be added three times.

Proposal: one term parser in fluree-graph-json-ld that takes the IRI expansion as an argument (the @context for JSON-LD, full IRIs only for SPARQL parameters), producing a shared term type that fluree-db-query and fluree-db-sparql lower from. Differences that are deliberate (for example null as UNDEF in values but refused as a parameter) stay with the caller.

Activity

  1. added
    enhancementNew feature or request
    P3Backlog: valid, low payoff-per-effort
    area:queryQuery execution, planning, fast paths, overlay, result formatting
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Backlog: valid, low payoff-per-effortarea:queryQuery execution, planning, fast paths, overlay, result formattingenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions