Created
December 10, 2013 00:43
-
-
Save jeffhandley/7883875 to your computer and use it in GitHub Desktop.
Named objects in a graph
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// What Example 46 shows here: http://json-ld.org/spec/latest/json-ld | |
"@graph" : [ | |
{ | |
"@id": "#homer", | |
"http://example.com/vocab#name": "Homer" | |
}, | |
{ | |
"@id": "#bart", | |
"http://example.com/vocab#name": "Bart", | |
"http://example.com/vocab#parent": { "@id": "#homer" } | |
}, | |
{ | |
"@id": "#lisa", | |
"http://example.com/vocab#name": "Lisa", | |
"http://example.com/vocab#parent": { "@id": "#homer" } | |
} | |
] | |
// What we want | |
"@graph" : { | |
"#homer" : { | |
"http://example.com/vocab#name": "Homer" | |
}, | |
"#bart" : { | |
"http://example.com/vocab#name": "Bart", | |
"http://example.com/vocab#parent": { "@id": "#homer" } | |
}, | |
"#lisa" : { | |
"http://example.com/vocab#name": "Lisa", | |
"http://example.com/vocab#parent": { "@id": "#homer" } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
We were looking at the indexing feature, so we'll look into that more; thanks!
And good to know about @graph being unnecessary here.