toJson method

  1. @override
Map<String, dynamic> toJson(
  1. GetServiceAuthOutput object
)

Implementation

@override
Map<String, dynamic> toJson(GetServiceAuthOutput object) {
  if (object.hasNotUnknown) {
    return object.toJson();
  }

  final json = object.toJson();

  final props = <String, dynamic>{};
  for (final key in json.keys) {
    if (key == r'$unknown') continue;
    props[key] = json[key];
  }

  return <String, dynamic>{
    ...props,
    ...json[r'$unknown'],
  };
}