Its mind-bogging amount of work to write correct algebraic types that make sense for most JSON and YAML config files. Pretty much every property is optional, but not really as some combinations are allowed while others not. If you are lucky there might be a JSON Schema with `oneof`s you can automatically map to unions, if not there will just be documentation (e.g. Concourse YAML). Sometimes there will even be two algebraic datatypes encoded in one object, so you would need 2 -> 1 value mapping (or 4 union tags for the possible combinations, whatever suits your fancy)
Since jsonnet is side-effect free, types are somewhat less needed. You can instead execute your code, which will generate values and which can report arbitrary runtime errors (all the way to the language server, even)
(Types would still be awesome for writing funcitons, though)
I dislike that it's json to transform json, it becomes a rats nest. I had similar experiences with xslt back in the day.