Re:Show HN: TypeSchema – A JSON specification to describe da...
by dragonwriter on Thursday October 24, 2024 @05:09PM
(#41939815)
Yeah, “idiomatic” may have been a poor word choice, I really meant closer to “simply representable”. oneOf, for instance, lets you very easily define flexible, concise structures in JSON Schema that OO languages without union types may not express naturally if at all, and which may not be natural to work with even if they cna be expressed in many languages.
[ Parent
| on HN ]
Re:Show HN: TypeSchema – A JSON specification to describe da...
by drdaeman on Thursday October 24, 2024 @05:29PM
(#41939995)
This makes sense, but I think it's even a better reason to not use a code generator (which forces certain patterns on your code), but rather think about the best language-native way to express a certain concept you want to express.