toJson method
Serialize to JSON for transmission over DTD or postMessage.
Implementation
Map<String, dynamic> toJson() => {
'extensionAvailable': extensionAvailable,
if (module != null) 'module': module,
'formats': {
for (final e in formats.entries)
_formatKey(e.key): {
'available': e.value.available,
'fileFound': e.value.fileFound,
if (e.value.path != null) 'path': e.value.path,
},
},
if (error != null) 'error': error,
if (dtdHealthy != null) 'dtdHealthy': dtdHealthy,
if (dtdRegistrationConflict)
'dtdRegistrationConflict': dtdRegistrationConflict,
if (dtdStatusMessage != null) 'dtdStatusMessage': dtdStatusMessage,
'fstLoading': fstLoading,
};