4 ms·
> It is considered essential that JSON schema is expressible as JSON Why? It's not a particularly difficult task to write a parser that could convert between t
by peterkelly 9y ago
> It is considered essential that JSON schema is expressible as JSON
Why? It's not a particularly difficult task to write a parser that could convert between the two representations. The TypeScript compiler even provides an API that lets you access its AST.
- deleted 9y ago[deleted]
- antjanus 9y agoWell, here's the thing, you can write a parser to translate that TS into JSON schema format and that works. At my job, we're currently running JS on the back-end and TS on the front-end. JSON-Schema can be used in both. We're also rebuilding our core functionality in Elixir, and guess what, JSON Schema works there, too, out of the box.
- atmartins 9y agoJSON schema can be the representation used to exchange information between two or more systems, languages, projects, etc. It's a form of lowest common denominator, something that can (somewhat) fully describe your interface but in a static, commonly available, easily parsed, easily generated way.