3 ms·
I led a project for validating customer-provided data against a json schema. The structure of the data was moderately complex, and it was getting bound to pojos
by dehrmann 7y ago
I led a project for validating customer-provided data against a json schema. The structure of the data was moderately complex, and it was getting bound to pojos by a pretty lenient binder. This caused issues when making additions to the API since customers were sending arbitrary fields, and duck typing the data wasn't that reliable. The easiest thing to validate before binding with a json schema.
What's different this and Python type hints is that this was a public-facing API, so you have far less control over what data you'll see, and the server code was Java, so getting things strongly typed and validated early on makes your life easier.
- BiteCode_dev 7y agoSchema validation is more than type checking, and has been very well solved by libraries like marshmallow and pydantic for a long time. I don't think the comparison holds.