new: GraphSerializer
opt: reuse JSON AST to avoid duplicate conversion