EditSortMembersResult.fromJson constructor

EditSortMembersResult.fromJson(
  1. JsonDecoder jsonDecoder,
  2. String jsonPath,
  3. Object? json
)

Implementation

factory EditSortMembersResult.fromJson(
    JsonDecoder jsonDecoder, String jsonPath, Object? json) {
  json ??= {};
  if (json is Map) {
    SourceFileEdit edit;
    if (json.containsKey('edit')) {
      edit = SourceFileEdit.fromJson(
          jsonDecoder, '$jsonPath.edit', json['edit']);
    } else {
      throw jsonDecoder.mismatch(jsonPath, 'edit');
    }
    return EditSortMembersResult(edit);
  } else {
    throw jsonDecoder.mismatch(jsonPath, 'edit.sortMembers result', json);
  }
}