Improve result serialisation approach in query sessions


#1

At the moment serialisation appears more complicated to potential client code than it should. Ideally we want to see something that works not unlike json.Marshal where a map[string]interface{} or a json tagged struct can be handed in to a MarshalResult method of the session and be filled. This should be able to happen without prior preparation of the results. ClearJSON would be renamed Reset.


what’s about gzipping of the output json?


That is something that can be done by the client. I don’t see the point of including compression in the serialisation.


From: https://github.com/cayleygraph/cayley/issues/168