jsonld.js icon indicating copy to clipboard operation
jsonld.js copied to clipboard

Improve `jsonld.UnsupportedVersion` error for strings.

Open davidlehn opened this issue 1 year ago • 1 comments

jsonld.UnsupportedVersion error should be more helpful when the error is due to a string value being used. "@version": "1.1" will report jsonld.UnsupportedVersion: Unsupported JSON-LD version: 1.1, which is confusing and doesn't hint that a number should be used like "@version": 1.1.

davidlehn avatar Oct 17 '24 16:10 davidlehn

Otherwise: At least display the version in quotes if it's a string, jsonld.UnsupportedVersion: Unsupported JSON-LD version: "1.1" If you don't want to give a more descriptive error as suggested by @davidlehn

cmahnke avatar Oct 17 '24 17:10 cmahnke