Allow export of ASTs to JSON