toJson method

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

Implementation

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