Skip to content

Commit 8a36927

Browse files
author
tinycode2
committed
updated docs to reflect further types of final node (@id, @index)
1 parent 7c56ee9 commit 8a36927

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,10 @@ doc.query("so:somepropertynotinyourdocument @value") // null
172172
173173
doc.queryAll("so:somepropertynotinyourdocument @value") // []
174174
175-
doc.query("so:favouriteReads[@index=pynchon_gp] so:name @value") // "Gravity's Rainbox"
175+
doc.query("ex:favouriteReads[@index=pynchon_gp] so:name @value") // "Gravity's Rainbox"
176+
177+
doc.queryAll("ex:favouriteReads @index") // [ "banks-exc", "pynchon-gr" ]
178+
doc.query("ex:favouriteReads @id") // [ "http://www.isbnsearch.org/isbn/9780553575378" ]
176179
```
177180

178181
[W3C JSON-LD recommendation]: https://www.w3.org/TR/json-ld/

features/data/person-favourite-reads.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,17 @@
99
"@value": "Linked person"
1010
}],
1111
"http://www.example.org#favouriteReads": [{
12+
"@id": "http://www.isbnsearch.org/isbn/9780553575378",
13+
"@index": "banks-exc",
1214
"http://schema.org/author": [{
1315
"@value": "Iain M Banks"
1416
}],
1517
"http://schema.org/name": [{
1618
"@value": "Excession"
17-
}],
18-
"@index": "banks-exc"
19+
}]
1920
}, {
21+
"@id": "http://www.isbnsearch.org/isbn/9780143039945",
22+
"@index": "pynchon-gr",
2023
"http://schema.org/author": [{
2124
"@value": "Thomas Pynchon"
2225
}],
@@ -25,8 +28,7 @@
2528
}],
2629
"http://www.example.org#note-to-self": [{
2730
"@value": "Need to finish reading this"
28-
}],
29-
"@index": "pynchon-gr"
31+
}]
3032
}],
3133
"http://xmlns.com/foaf/0.1/firstName": [{
3234
"@value": "Andrew"

0 commit comments

Comments
 (0)