Serialize parse tree using JSON to view it