fromJson method

  1. @override
Create fromJson(
  1. Map<String, dynamic> json
)

Implementation

@override
Create fromJson(Map<String, dynamic> json) {
  final props = <String, dynamic>{};
  for (final key in json.keys) {
    if (_kLexCompatibleProperties.contains(key)) {
      props[key] = json[key];
    } else {
      if (props.containsKey(r'$unknown')) {
        props[r'$unknown'][key] = json[key];
      } else {
        props[r'$unknown'] = <String, dynamic>{};
        props[r'$unknown'][key] = json[key];
      }
    }
  }

  return Create.fromJson(props);
}