Skip to content

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

Closed as duplicate

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
    enhancement
    P3
    area:query
    on Oct 7, 2026
  2. bplatz commented on Nov 20, 2026

    @bplatz
    ContributorAuthor

    Duplicate of #2407, which now lists this issue's three readers (the values clause, where value objects and SPARQL parameters) alongside the write-side ones.

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

    P3area:queryenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions