The value associated with the @value key MUST be either a string, a number, true, false or null. If the value associated with the @type key is @json, the value MAY be either an array or an object.
The endpoint uses jsonld.compact from PyLD, which in this test throws an error:
pyld.jsonld.JsonLdError: ('Could not expand input before compaction.',)
Type: jsonld.CompactError
Cause: ('Invalid JSON-LD syntax; "@value" value must not be an object or an array.',)
This is correct behaviour for the first part of the specification, but providing the '@type': '@json' should allow the value to be an array/object
Sorry that the example is so specific to my project.. let me know if I can improve the info given!
I'm working on a project which uses PyLD as a dependency. Reviewing the JSON-LD spec on value objects, it reads
Based on this I wrote a unit test
The endpoint uses
jsonld.compact
from PyLD, which in this test throws an error:This is correct behaviour for the first part of the specification, but providing the
'@type': '@json'
should allow the value to be an array/objectSorry that the example is so specific to my project.. let me know if I can improve the info given!