toJson method
Converts diagnostic metadata into a serialization-friendly map.
This intentionally contains text lines and change summaries only; it is
not lossless capture JSON. Use artisanal_capture's
captureProgramFrame with a snapshot that has nativeFrame when a
canonical cell capture is required.
Implementation
Map<String, Object?> toJson() {
return <String, Object?>{
'sequence': sequence,
'renderGeneration': renderGeneration,
'degradationLevel': degradationLevel.name,
'renderDurationUs': renderDuration.inMicroseconds,
'width': width,
'height': height,
'lines': List<String>.unmodifiable(lines),
'changeSummary': changeSummary.toJson(),
};
}