toJson method
Implementation
Map<String, dynamic> toJson() {
return {
if (offset != null) 'offset': offset,
if (limit != null) 'limit': limit,
if (fields != null) 'fields': fields,
if (translate != null) 'translate': translate,
if (sortBy != null) 'sortBy': sortBy,
if (action != null) 'action': action,
if (related != null) 'related': Map.fromEntries(related!),
'data': {
if (version != null) 'version': version,
if (id != null) 'id': id,
if (data != null) ...?data,
if (domain != null) '_domain': domain,
if (domainContext != null) '_domainContext': domainContext,
if (archived != null) '_archived': archived,
if (criteria != null) ...parseCriteria(criteria!),
}
};
}