Possible method for JSON output of the AST

Related to this [this](https://github.com/jgm/stmd/issues/53) discussion about a way to output the AST, this doesn't validate the output JSON against a Schema though...