@Patricia You can have schemas for JSON, but people say they like JSON for being comparatively succinct and if you want to do anything that looks like static typing then JSON ends up being wayyyyy more verbose because it doesn’t have attributes or tag names…
@elfprince13 Ok, I want json schemas then?
@Patricia I don’t know if “want” is the right word ;) but there is a standard format for them and they exist for many web APIs
@Patricia have you seen this yet? Just stumbled across it today and looks nice https://quicktype.io/
@elfprince13 no I hadn’t, have you tried it?
@Patricia I spent a good chunk of the day debugging 3rd-party code that I think was generated by it, and came away reasonably sure that wasn't the source of the bug I was experiencing
@elfprince13 so good?
@Patricia I think so, from limited perspective of having used its generated code, but not having used it to do the actual code generation myself.
@elfprince13 @Patricia I have a tool I wrote for this to generate C++ code and bindings for the JSON Link library. It happens often enough that schemas are not available but just a web service I can get data from.
@Patricia a couple times I’ve had to write one-off scripts using https://apitools.dev/json-schema-ref-parser/ to patch together a more complete non-hyperlinked schema to feed into other tools that want a single file