toJson method

Map<String, dynamic> toJson ()

Implementation

Map<String, dynamic> toJson() {
  final params = <String, dynamic>{};

  params["className"] = className;
  params["where"] = _where;

  if (_limit >= 0) {
    params["limit"] = _limit;
  }
  if (_countEnabled) {
    params["count"] = 1;
  } else {
    if (_skip > 0) {
      params["skip"] = _skip;
    }
  }
  if (_order.isNotEmpty) {
    params["order"] = ParseTextUtils.join(",", _order);
  }
  if (_includes.isNotEmpty) {
    params["include"] = ParseTextUtils.join(",", _includes);
  }
  if (_selectedKeys != null) {
    params["fields"] = ParseTextUtils.join(",", _selectedKeys);
  }

  return params;
}