Open clbarnes opened 1 year ago
A JSON Schema would also help to formalize the partly vague File Format specification. By now some parts are not strictly defined but only shown as examples. This is not related to #32 - JSON Schema just happens to be common with implementations in several programming language to validate both JSON and YAML files.
And you can write and maintain the schema in YAML, which is much nicer, given it's support for comments and such, and just run a CI process to create a JSON version.
institution:
title: Literal name text; should not be parsed
# comment
description: Use for institutional creator names; e.g. 'National Institutes of Health'
type: string
In general, the additional metadata on the properties will allow editors with support for this to provide auto-completion tooltips and such.
BTW, presumably this means you don't really support corporate names in these author lists?
author: ["Doe, Jane", "Some org, Some subunit"]
How would you deal with that?
We've struggled with these questions in CSL.
Hey y'all, I've created a JSON specification for Hayagriva in PR https://github.com/typst/hayagriva/pull/192. Please provide your feedback!
Somewhat related to #32; it would be much easier to interact with the YAML file from other languages if there were a programmatic schema for it.