Google\Cloud\Datastore\Query\GqlQuery::jsonSerialize PHP Method

jsonSerialize() public method

Define the json respresentation of the object.
public jsonSerialize ( ) : array
return array
    public function jsonSerialize()
    {
        return $this->queryObject();
    }

Usage Example

Example #1
0
 public function testJsonSerialize()
 {
     $query = new GqlQuery($this->mapper, 'SELECT * FROM foo');
     $this->assertEquals($query->jsonSerialize(), $query->queryObject());
 }