toJson method
Implementation
Map<String, dynamic> toJson() {
return {
'nodeId': nodeId.toJson(),
'backendNodeId': backendNodeId.toJson(),
'nodeType': nodeType,
'nodeName': nodeName,
'localName': localName,
'nodeValue': nodeValue,
if (parentId != null) 'parentId': parentId!.toJson(),
if (childNodeCount != null) 'childNodeCount': childNodeCount,
if (children != null)
'children': children!.map((e) => e.toJson()).toList(),
if (attributes != null) 'attributes': [...?attributes],
if (documentURL != null) 'documentURL': documentURL,
if (baseURL != null) 'baseURL': baseURL,
if (publicId != null) 'publicId': publicId,
if (systemId != null) 'systemId': systemId,
if (internalSubset != null) 'internalSubset': internalSubset,
if (xmlVersion != null) 'xmlVersion': xmlVersion,
if (name != null) 'name': name,
if (value != null) 'value': value,
if (pseudoType != null) 'pseudoType': pseudoType!.toJson(),
if (pseudoIdentifier != null) 'pseudoIdentifier': pseudoIdentifier,
if (shadowRootType != null) 'shadowRootType': shadowRootType!.toJson(),
if (frameId != null) 'frameId': frameId!.toJson(),
if (contentDocument != null) 'contentDocument': contentDocument!.toJson(),
if (shadowRoots != null)
'shadowRoots': shadowRoots!.map((e) => e.toJson()).toList(),
if (templateContent != null) 'templateContent': templateContent!.toJson(),
if (pseudoElements != null)
'pseudoElements': pseudoElements!.map((e) => e.toJson()).toList(),
if (distributedNodes != null)
'distributedNodes': distributedNodes!.map((e) => e.toJson()).toList(),
if (isSVG != null) 'isSVG': isSVG,
if (compatibilityMode != null)
'compatibilityMode': compatibilityMode!.toJson(),
if (assignedSlot != null) 'assignedSlot': assignedSlot!.toJson(),
};
}