Closed
Description
How should errors be handled when fromRdf tries to parse an invalid JSON literal? I'm not sure if one of the current error codes [1] is appropriate or if an "invalid JSON literal" or similar code should be added. I added that and a test in the jsonld.js JSON literal patch [2], but it's an ad-hoc code and the API spec and tests should probably specify what to do.
[1] https://w3c.github.io/json-ld-api/#jsonlderrorcode
[2] digitalbazaar/jsonld.js#325