ProtoGoogleStruct.fromJson constructor
ProtoGoogleStruct.fromJson(
- Map<
String, dynamic> json, { - ProtoJsonConfig config = DefaultProtoJsonConfig.defaultConfig,
Implementation
factory ProtoGoogleStruct.fromJson(
Map<String, dynamic> json, {
ProtoJsonConfig config = DefaultProtoJsonConfig.defaultConfig,
}) {
final fields = json['fields'];
if (fields is Map) {
return ProtoGoogleStruct(
fields: fields.map(
(k, v) => MapEntry(k.toString(), ProtoGoogleValue.fromDynamicJson(v)),
),
);
}
return const ProtoGoogleStruct();
}