Re:Show HN: TypeSchema – A JSON specification to describe da...
by andix on Thursday October 24, 2024 @05:36PM
(#41940076)
I can't really follow those arguments either. For example the empty object example {}. Why is this bad? Types without properties are a real thing. Also an empty schema is a real thing.
The thought I do get: JSON Schema primarily describes one main document (object/thing). And additionally defines named types (#/definitions/Student). But it's totally fine to just use the definitions for code generation.
The reference semantics of JSON Schema is quite powerful, a little bit like XML with XSD and all the different imports and addons.
Re:Show HN: TypeSchema – A JSON specification to describe da...
by llamaLord on Thursday October 24, 2024 @09:17PM
(#41941440)
Maybe it's just me, but I've never been able to get a complex type schema to work properly with JSON schema.
The moment you have types referencing other types in a way that can become recursive in ANY way, the whole thing seems to explode.
It seems to me like a mischaracterization of JSON Schema to say you can't define a concrete type without actual data.
I am a very stupid individual so I could be misunderstanding the argument.