Type coercion of blank nodes in JSON-LD -
i have set of json files trying upgrade json-ld through addition of context reference. 1 feature of files array of items of same type. trying use type coercion specify type, i'm having trouble. items in array represented blank nodes, don't have explicit ids - possible automatically assign them types? i'm not sure if possible within json-ld syntax - i'm sure must know!
here's presently works:
{ "@context": { "ex": "http://example.com/schema#", "items": { "@id": "ex:hasitem", "@container": "@set" }, "item": "ex:item", "size": "ex:size", "weight": "ex:weight" }, "@id": "my item set", "items": [ { "@type": "item", "size": 43, "weight": 57 }, { "@type": "item", "size": 99, "weight": 3.14 } ] }
here's i'd do, not have desired effect:
{ "@context": { "ex": "http://example.com/schema#", "items": { "@id": "ex:hasitem", "@container": "@set", "@type": "ex:item" }, "size": "ex:size", "weight": "ex:weight" }, "@id": "my item set", "items": [ { "size": 43, "weight": 57 }, { "size": 99, "weight": 3.14 } ] }
is there way me specify things in items
container have @type: "item"
?
Comments
Post a Comment