mff-uk / dataspecer

https://dataspecer.com
MIT License
21 stars 7 forks source link

Generated JSON-LD and JSON Schema should not contain "/" character #343

Open LadyMalande opened 10 months ago

LadyMalande commented 10 months ago

When working with generated json-ld context, I came upon a parsing error caused by "/" (slash) character:

jsonld.SyntaxError: Invalid JSON-LD syntax; invalid scoped context.

slashInKeyJSONLDSyntaxError

After replacing the slash with underscore character, the syntax error is gone:

slashInKeyJSONLDSyntaxErrorFixed

The invalid character causes problems mainly with json-ld processing but since json schema is closely tied to working with context, I think changes should be made for both generators - json schema and json-ld.

jakubklimek commented 9 months ago

Reported in https://github.com/digitalbazaar/jsonld.js/issues/543

LadyMalande commented 9 months ago

Thank you for clarification and pointer to the issue in used libraries!