I've been suggested by the QuickType team to create a pull request of what I've already got, and here it is:
https://github.com/quicktype/quicktype/pull/1149You're all more than welcome to leave any feedback in GitHub's review tool, especially regarding my encode_json() implementation for generated Pike classes.
If you would like to try it out, simple clone my fork and follow the instructions in README.
It even has enum and union support!
Regarding JSON decoding - we can obviously use Standards.JSON.decode() that accepts a string and returns a Pike object whose type depends on the input value, but a greater challenge is determining what type is represented by the JSON (that "program type_for_json(mapping some_decoded_json);" mentioned by Bill). I would really appreciate some tips, ideas and suggestions on it.
Unfortunately, inheritance is not yet supported by QuickType. That's a great shame, because it's a key feature we need if we want to make use of the LSP and DAP specification schemas. Fortunately, I've received some guidelines from the QuickType team on how it might possibly be implemented, and I'll get to it after I finish Pike support.
I have to say that the QuickType team is very eager to help and really friendly, so if I really encourage to join me in this project if anyone's interested.
Matt