ExecutePipelineResponse.fromJson constructor
ExecutePipelineResponse.fromJson(
- Object? j
Implementation
factory ExecutePipelineResponse.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ExecutePipelineResponse(
transaction: switch (json['transaction']) {
null => Uint8List(0),
Object $1 => decodeBytes($1),
},
results: switch (json['results']) {
null => [],
List<Object?> $1 => [for (final i in $1) Document.fromJson(i)],
_ => throw const FormatException('"results" is not a list'),
},
executionTime: switch (json['executionTime']) {
null => null,
Object $1 => Timestamp.fromJson($1),
},
explainStats: switch (json['explainStats']) {
null => null,
Object $1 => ExplainStats.fromJson($1),
},
);
}