toJson method

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

Implementation

@override
Map<String, dynamic> toJson(CreateAccountOutput 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'],
  };
}