The Run() method on the QueryRequest type would fail, since it would
encode the inner body of the query to JSON and not the complete, outer
body (i.e. including the "body: {}" portion).
The commit also adds MarshalJSON() methods to both QueryRequest and
AggregationRequest, allowing them to implement the json.Marshaller
interface, and providing easier debugging of the library. A test
skeleton for this is also added.
The
Run()
method on theQueryRequest
type would fail, since it would encode the inner body of the query to JSON and not the complete, outer body (i.e. including the "body: {}" portion).The commit also adds
MarshalJSON()
methods to bothQueryRequest
andAggregationRequest
, allowing them to implement thejson.Marshaller
interface, and providing easier debugging of the library. A test skeleton for this is also added.