w3c / w3c/json-ld-syntax

feature request: mapping on simple paths

Open
#419 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
139
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Is there a possibility to add a path to a property mapping?

In my target RDF structure I have

ex:123 <https://dvl.be/ns/model#prop1> _:b0 .
_:b0 <https://dvl.be/ns/model#prop2> "AAAB" .

which would correspond to a json structure (one-to-one) as follows

 "prop1" : {
   "prop2" : "AAAB"
 },

But now I have the challenge that I would like to create a json structure:

"prop3" : "AAAB"

where thus the nesting in RDF is lifted.

It would be nice if I could map prop3 as follows in a path:

"prop3" : {
     "@id" : "<https://dvl.be/ns/model#prop1>/<https://dvl.be/ns/model#prop2>"
    }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no repository files, tests, or entry points. Start by reviewing the JSON-LD 1.1 specification and existing mapping behavior, then determine where path mappings are defined and how the proposed lifted structure should be specified. Done should include an agreed behavior and corresponding specification examples or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
json
Domain
documentation
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.