toJson method
Encodes this CockpitWebSocketFrame as a JSON object.
Implementation
Map<String, Object?> toJson() => <String, Object?>{
'sequence': sequence,
'direction': direction.name,
'kind': kind.name,
'at': at.toUtc().toIso8601String(),
'payloadBytes': payloadBytes,
'finalFragment': finalFragment,
'compressed': compressed,
if (preview != null) 'preview': preview,
};