json-ld / json-ld.org

JSON for Linked Data's documentation and playground site
https://json-ld.org/
Other
852 stars 151 forks source link

playground error: read properties of null #804

Open ericprud opened 1 year ago

ericprud commented 1 year ago

The playground gives this error

TypeError: Cannot read properties of null (reading 'termType')

(4X) when composing a "@container": "@list" with an @id:

      "entries": [
        {
          "@id": "#3backtick_pass",
          "@type": "http://a.example/ValidationTest"
        }

Changing the @id to @id999 gets rid of the error.

gkellogg commented 1 year ago

It's an issue with establishing the Base IRI for expanding "#3backtick_pass". You can set a base IRI in Options (although, it says it has a default). Error message might be a bit more informative, perhaps.

Note that using "@type": "@id" in the term definition doesn't really do anything, as each list member is an object.

ericprud commented 1 year ago

I tried setting the Base but still see the same error.

+1 to more informative error message.