OverriddenMember.fromJson constructor
OverriddenMember.fromJson(
- JsonDecoder jsonDecoder,
- String jsonPath,
- Object? json
)
Implementation
factory OverriddenMember.fromJson(
JsonDecoder jsonDecoder, String jsonPath, Object? json) {
json ??= {};
if (json is Map) {
Element element;
if (json.containsKey('element')) {
element =
Element.fromJson(jsonDecoder, '$jsonPath.element', json['element']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'element');
}
String className;
if (json.containsKey('className')) {
className =
jsonDecoder.decodeString('$jsonPath.className', json['className']);
} else {
throw jsonDecoder.mismatch(jsonPath, 'className');
}
return OverriddenMember(element, className);
} else {
throw jsonDecoder.mismatch(jsonPath, 'OverriddenMember', json);
}
}