fromJson method

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

Implementation

@override
SearchPostsOutput 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 SearchPostsOutput.fromJson(props);
}