w3c / json-ld-api

JSON-LD 1.1 Processing Algorithms and API Specification
https://w3c.github.io/json-ld-api/
Other
73 stars 29 forks source link

toRdf() and flatten() API require extractAllScripts to default to true #603

Open gkellogg opened 2 weeks ago

gkellogg commented 2 weeks ago

The JSON-LD section on JSON-LD in HTML Documents specifically says that all script all script elements are extracted, implying that the default value of |extractAllScripts| should be true for the toRdf() API entry point.

Tests for flatten() also say that it should extract all script elements, although there is no normative text to this effect.

Changing the behavior of flatten() would represent a change to the 1.1 behavior, but may be warranted.

The toRdf() entry point should be updated to say that the default is true.

TallTed commented 1 week ago

The toRdf() entry point should be updated to say that the default if true.

Typo... default if `true` -> default is `true`