toJson method
Wire form with stable key order (zap first — the envelope reads
top-down).
Implementation
@override
Map<String, Object?> toJson() => <String, Object?>{
'zap': zapProtocolVersion,
'type': type,
'id': id,
'ts': ts,
'missionId': missionId,
'kind': kind,
if (stateId != null) 'stateId': stateId,
if (digest != null) 'digest': digest,
if (steps != null) 'steps': steps,
if (at != null) 'at': at,
};