'Export a JSON representation of the resource.
@param fields: list of field selector strings
@param start: index of the first record
@param limit: maximum number of records
@param left: list of (additional) left joins
@param distinct: select only distinct rows
@param orderby: Orderby-expression for the query
@return: the JSON (as string), representing a list of
dicts with {"tablename.fieldname":"value"}'

def json(self, fields=None, start=0, limit=None, left=None, distinct=False, orderby=None):

    data = self.select(fields=fields, start=start, limit=limit, orderby=orderby, left=left, distinct=distinct)['rows']
    return json.dumps(data)
