Comments (6)
π to the use case. Have you tried implementing a solution to this, @gkellogg ?
from json-ld-framing.
I generally implement things before considering a specification update, and I'll take a look, in due course. (Unless, of course @dlongley or @davidlehn beat me to it!).
from json-ld-framing.
Resolution on the WG call of 2018-09-14 was to accept this issue as valid and valuable, and to seek additional implementation experience for potential solutions.
from json-ld-framing.
So, this ends up running afoul of the general framing algorithm. When framing a property with a node value, it looks for a frame associated with the property, if there is none, it constructs one using @embed
, @explicit
and @requireAll
:
From Framing 4.4.2.3.2:
... If frame does not exist, create a new frame using a new dictionary with properties for
@embed
,@explicit
and@requireAll
taken from embed, explicit and requireAll.
The requested logic would require us to construct a new frame based on properties of the existing frame, which could have wide implications.
The best we can do without radical changes would be to make the sub-frames explicit (playground):
{
"@context" : {
"@vocab" : "http://purl.bdrc.io/ontology/core/",
"taxSubclassOf" : {
"@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
"@type" : "@id"
},
"bdr" : "http://purl.bdrc.io/resource/",
"children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" }
},
"@id" : "bdr:O9TAXTBRC201605",
"children": {
"children": {
"children": {}
}
}
}
This generates the following, with backwards and forwards links:
{
"@context" : {
"@vocab" : "http://purl.bdrc.io/ontology/core/",
"taxSubclassOf" : {
"@id" : "http://purl.bdrc.io/ontology/core/taxSubclassOf",
"@type" : "@id"
},
"bdr" : "http://purl.bdrc.io/resource/",
"children": { "@reverse": "http://purl.bdrc.io/ontology/core/taxSubclassOf" }
},
"@id" : "bdr:O9TAXTBRC201605",
"children": [{
"@id": "bdr:O9TAXTBRC201605_0001",
"@type": "Taxonomy",
"taxSubclassOf": "bdr:O9TAXTBRC201605",
"children": {
"@id": "bdr:O9TAXTBRC201605_0002",
"@type": "Taxonomy",
"taxSubclassOf": "bdr:O9TAXTBRC201605_0001"
}
}, {
"@id": "bdr:O9TAXTBRC201605_0010",
"@type": "Taxonomy",
"taxSubclassOf": "bdr:O9TAXTBRC201605"
}]
}
(Note that unused repetitions of "children" are ignored if there are no children).
This seems like an acceptable solution to me requiring no change.
from json-ld-framing.
This issue was discussed in a meeting.
RESOLVED: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion
View the transcript
3.1. Infinite @reverse framing recursion (Greggβs findings)Rob Sanderson: link: #5
Gregg Kellogg: raises question about framing design criteria
β¦ if there is no frame to be matched, algo constructs one
β¦ so if you have something that infinitely recurses on @reverse, would mean a change to algo
Gregg Kellogg: #5 (comment)
Gregg Kellogg: solution suggested in my latest comment is to use frame as really intended
β¦ you would create necessary children finitely
Rob Sanderson: does this mean it works any differently for @reverse?
Gregg Kellogg: not really. In the absence of a property in the reverse it would create it.
Rob Sanderson: so if wanted to be explicit in the non-reverse direction you would just ???
Gregg Kellogg: no change, but describe behavior / example in primer
Rob Sanderson: questions?
Rob Sanderson: s/???/include them explicitly in the frame, the same as for @reverse/
Rob Sanderson: if not, how do we want to resolve? example in spec or note in primer?
Benjamin Young: willing to take a crack at what should go into primer
Adam Soroka: agree
Rob Sanderson: a note in the spec and then a longer discussion in primer?
Proposed resolution: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion (Rob Sanderson)
Gregg Kellogg: +1
Rob Sanderson: +1
Benjamin Young: +1
Ivan Herman: +1
Tim Cole: +1
Adam Soroka: +1
Simon Steyskal: +1
Jeff Mixter: +1
Rob Sanderson: +1
Benjamin Young: +1
Resolution #2: Add a note to the framing spec about the asymmetry, and longer explanation with examples in the primer document for issue framing#5 on @reverse recursion
from json-ld-framing.
Moved to Editorial given Resolution above.
from json-ld-framing.
Related Issues (20)
- Should tests for `@embed`: `@last` be restricted to JSON-LD 1.0? HOT 4
- Framing and Arrays HOT 4
- Ex. 41 Playground doesn't contain `@omitGraph: false` + playground does not apply `@omitGraph` HOT 3
- Pattern Matching HOT 4
- Can frames produce id maps? HOT 2
- Possible typos HOT 2
- Use a property several time when framing HOT 1
- validation errors/warnings HOT 1
- Language map with global context HOT 1
- IANA profile should be `frame` not `framed` HOT 5
- how to use the `frame` and `framed` profiles? HOT 12
- Fix invalid WebIDL HOT 1
- Change "Lexicographical Order" (and related) to "Unicode code point order". HOT 1
- Possible bug with `@json` being treated as invalid `type` in frame HOT 24
- How to use specific value inside a frame to filter out credentials those do not contain that value
- Framing on nested graphs
- Add test for `@graph` keyword aliasing
- more JSON-LD framed examples for performance testing
- Type Coercion / Node Conversion HOT 3
- Need tests for: Framing matches on specified value
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from json-ld-framing.