You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now, I would like to change the records container from a @set to an @id map. But when I do that I get the error jsonld.SyntaxError: Invalid JSON-LD syntax; a JSON-LD frame must be a single object. (I’m not sure what that error means, since the frame is still a single object.)
Should this work? I can’t find any mention of id maps in the framing spec. Some simpler examples seem to work, but I can’t get anything to work that involves specifying anything (property matches or processing directives) below the level of the id map.
The text was updated successfully, but these errors were encountered:
What's happening is that when you define "records" with "@container": "@id", the frame looks like the object value should be an ID map, but it isn't Wrap the value in an array.
Recall that ID maps are an attribute of compaction, not framing, but as you've found, when used in a frame it may require you to conform to the shape required.
I would like to use framing to produce an id map, but this does not seem to work very well with the JSON-LD processors I’ve tried.
Take for example the following graph:
And this frame:
Which produces:
(See the above on the playground).
So far so good.
Now, I would like to change the
records
container from a@set
to an@id
map. But when I do that I get the errorjsonld.SyntaxError: Invalid JSON-LD syntax; a JSON-LD frame must be a single object.
(I’m not sure what that error means, since the frame is still a single object.)Should this work? I can’t find any mention of id maps in the framing spec. Some simpler examples seem to work, but I can’t get anything to work that involves specifying anything (property matches or processing directives) below the level of the id map.
The text was updated successfully, but these errors were encountered: