Skip to content

Add support for native JSON5 loading of schemas? #102

Closed
@mondeja

Description

@mondeja

This would be really great because usually there are complex schemas that can only be documented inside multiline comments. There is a $comment keyword added in the draft 7 of JSON Schema but I find it useless for documentation, mainly because the lack of support for structured patterns like lists or code blocks.

The unique problem that I see in a possible implementation is how to parse the null, NaN and Infinity keywords of JSON5, which are beyond JSON limitations. The safest would be, I think, to raise an error if found.

Anyways, I'm not sure if this is beyond of the scope of this project.

Personal current workaround

I'm currently documenting schemas in files apart, but I'm planning to download the JSON5 files in a local folder caching and converting to JSON them, adding that folder to a .gitignore file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions