Skip to content

Commit 9f89e86

Browse files
committed
Describe @id and @type maps in README.
1 parent e688e8b commit 9f89e86

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,20 @@ A term definition can include `@context`, which is applied to values of that obj
284284
"foo": "Bar"
285285
}
286286

287+
### @id and @type maps
288+
The value of `@container` in a term definition can include `@id` or `@type`, in addition to `@set`, `@list`, `@language`, and `@index`. This allows value indexing based on either the `@id` or `@type` of associated objects.
289+
290+
{
291+
"@context": {
292+
"@vocab": "http://example/",
293+
"idmap": {"@container": "@id"}
294+
},
295+
"idmap": {
296+
"http://example.org/foo": {"label": "Object with @id <foo>"},
297+
"_:bar": {"label": "Object with @id _:bar"}
298+
}
299+
}
300+
287301
### Framing Updates
288302
The [JSON-LD Framing 1.1 Specification]() improves on previous un-released versions.
289303

0 commit comments

Comments
 (0)