deserializeBatch method
Decode a batch response.
Implementation
List<Map<String, dynamic>> deserializeBatch(String raw) {
try {
final decoded = jsonDecode(raw);
if (decoded is List) {
return decoded.cast<Map<String, dynamic>>();
}
throw BridgeError.parseError('Expected JSON array for batch');
} on FormatException catch (e) {
throw BridgeError.parseError('Invalid JSON batch: ${e.message}');
}
}