3 ms·
Why reinvent https://json-schema.org https://json-schema.org ?? Pros/cons?
by matthewtovbin 2y ago
Why reinvent https://json-schema.org https://json-schema.org ?? Pros/cons?
- michaelsalim 2y agoFrom my understanding, JSON schema describes the schema of JSON objects with JSON. This one describes a variety of types of schemas with JSON. So it could be typescript, Go, GraphQL, etc. It seems to output to JSON schema as well. I guess its main purpose is to share the schema between different languages. Which I imagine works with JSON schema too, but this takes it a step further and handle all the mapping you'd need to do otherwise.
- froh 2y agojson schema has nuanced and expressive constraints to validate information exchanged in json serialization. typeschema in contrast seems to focus on describing just the structure of data with the goal to generate stubs in a wide variety of programming languages.
- oaiey 2y agoso why not sub-setting JSON Schema? Like done with XML Infoset for example compared to XSD. And extensions are also possible to achieve POCO details as needed.