Query Tree Representation in JSON