decode static method
Decode S&F frame bytes into message using JSON
Implementation
static SFMessage decode(Uint8List frameBytes) {
try {
final json = utf8.decode(frameBytes);
final data = jsonDecode(json) as Map<String, dynamic>;
return SFMessage.fromJson(data);
} catch (e) {
throw FormatException('Failed to decode SFFrame: $e');
}
}