Load JSON-LD in the same way as JSON
The JSON-LD standard requires sending what is effectively JSON content using a different MIME type. Because of that, it is usually required to use a file extension other than .json
since that is what is typically used in MIME type mapping in HTTP servers. The IANA-registered file extension is .jsonld
.
This patch makes .jsonld
documents loadable through require() in the exact same manner that .json
files are.