Skip to content

JSON Schema for Pandoc JSON AST #11123

@perrotuerto

Description

@perrotuerto

Describe your proposed improvement and the problem it solves. The 3.8 release came with a really nice improvement regarding XML schemata. I would like to see a similar improvement with the JSON output by having a JSON Schema available in tools/. The benefits I see for a JSON Schema are for testing and validation of ASTs, and data exchange across systems. This would give more flexibility in the usage of pandoc at the same time it ensures structural consistency of the AST, regardless of what we use to manipulate the JSON AST.

Describe alternatives you've considered. As a publisher that usually has to deal with several docs, I have been performing QA and data structure fixes with filters. The filters are really pleasant, but if I have hundreds of documents, or they are managed by a CMS, or they are part of a wider workflow, filters require specific acknowledgment of pandoc and dedicated usage. But if instead of working with docs+filters, I work with JSON ASTs, I am able to perform data analysis and data transformation with conventional workflows and tools.

Having a JSON Schema could allow me to work on documents at scale and without worrying too much about interoperability, speed and consistency of the AST besides the document exportation with Pandoc. So, as a publisher, I could work as I please with the confidence that whenever I want to export, the JSON ASTs are ready to ship in n formats with Pandoc :D

For the JSON Schema I read #10996 and I am under the impression that the ideal JSON Schema would be produced from the code instead of being done and maintained manually. Is that right?

My idea is to have a JSON Schema for every upcoming Pandoc releases, and see how it is possible to keep producing schemata for upcoming releases.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions