4 ms·
> I think JSON Schema could have been a bit simpler, but it's still nowhere near to making the same mistakes as XML Schema. Agree with every single one of your
by mstade 5y ago
> I think JSON Schema could have been a bit simpler, but it's still nowhere near to making the same mistakes as XML Schema.
Agree with every single one of your points, and this in particular. Thankfully, there are some heroes out there developing excellent tooling to make working with JSON schema easier. I've been making good use of Ajv[1], and highly recommend it to anyone having to deal with JSON payloads and schemas in a javascript environment. (I'm not affiliated with Ajv in any way, just happy with it.)
Working without a schema is much faster when getting started, obviously, but once things solidify in my experience a schema will help more than it costs and excellent tooling goes a long way in easing that transition from schema-less POCs to stable high quality implementations.
[1]: https://ajv.js.org https://ajv.js.org
- dnautics 5y agoI used to resent the changes between the draft JSONSchema, but on reflection, almost all of them have been, IMO, extremely well chosen.