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
Dealing with the @context definition once more, I noticed that our JSON Schema currently allows for @context definitions that contain objects with non-string values (e.g., {"foo": 42}, see here and the example TD below). However, passing the same TD into a JSON-LD processor (see here) leads to an error since according to JSON-LD, all values have to be strings.
I therefore wonder if we could on the one hand fix the JSON Schema to enforce the usage of valid JSON-LD within TDs and, on the other hand, if we should make the type definition in the TD Specification a bit stricter for TD 2.0. While there are some restrictions on the shape of the key-value pairs of the Maps within the @context, I think there is no MUST requirement for a map entry to have values of type string. So maybe this is something we can revisit for the next version.
Pasting this in Playground results in JSON-LD validation error jsonld.SyntaxError: Invalid JSON-LD syntax; @context term values must be strings or objects.. However, as you have noted, there is no assertion that says that TDs MUST be valid JSON-LDs in the first place. There are many implicit wordings but nothing very obvious.
Dealing with the @context definition once more, I noticed that our JSON Schema currently allows for @context definitions that contain objects with non-string values (e.g.,
{"foo": 42}
, see here and the example TD below). However, passing the same TD into a JSON-LD processor (see here) leads to an error since according to JSON-LD, all values have to be strings.I therefore wonder if we could on the one hand fix the JSON Schema to enforce the usage of valid JSON-LD within TDs and, on the other hand, if we should make the type definition in the TD Specification a bit stricter for TD 2.0. While there are some restrictions on the shape of the key-value pairs of the Maps within the
@context
, I think there is no MUST requirement for a map entry to have values of typestring
. So maybe this is something we can revisit for the next version.Example Thing Description
The text was updated successfully, but these errors were encountered: