toJson method

  1. @override
Map<String, Object?> toJson()
override

Returns the JSON representation.

Implementation

@override
Map<String, Object?> toJson() => {
      'data': data,
      if (links.isNotEmpty) 'links': links,
      if (included.isNotEmpty) 'included': included,
      if (meta.isNotEmpty) 'meta': meta,
    };