toJson method

Map<String, Object> toJson()

Implementation

Map<String, Object> toJson() => {
      'type': type,
      if (id != null) 'id': id!,
      if (lid != null) 'lid': lid!,
      if (attributes.isNotEmpty) 'attributes': attributes,
      if (relationships.isNotEmpty) 'relationships': relationships,
      if (meta.isNotEmpty) 'meta': meta,
    };