toJson method

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

Converts the object to a JSON-encodable object.

Implementation

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