Recursively nested properties and compaction
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 106
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
Following the discussion in #380, I have a question:
Consider the following data:
{
"@context": {
"foo": "http://example.org/foo",
"bar": "http://example.org/bar",
"baz": "http://example.org/baz",
"n1": "@nest",
"n2": "@nest"
},
"foo": "FOO",
"n1": {
"bar": "BAR",
"n2": {
"baz": "BAZ"
}
}
}
Can I expand it and compact it back to the same shape (including the doubly-nested property baz)?
I gave it a try there but with no luck.
If this is indeed impossible, I'm not suggesting we should fix it now. But I'm trying to decide how bad it is if we introduce an asymmetry between expansion and compaction wrt nested properties in #388. If it appears that the asymetry is already there (in the example above), that would help be byte the bullet.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the discussion in #380 and the proposed asymmetry in #388, then reproduce the supplied example in the linked JSON-LD Playground. Compare expansion and compaction for the doubly nested @nest properties; done means documenting whether the original shape can be round-tripped and what that implies for the proposed change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- json
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100