toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    if (parentIndex != null) 'parentIndex': [...?parentIndex],
    if (nodeType != null) 'nodeType': [...?nodeType],
    if (shadowRootType != null) 'shadowRootType': shadowRootType!.toJson(),
    if (nodeName != null)
      'nodeName': nodeName!.map((e) => e.toJson()).toList(),
    if (nodeValue != null)
      'nodeValue': nodeValue!.map((e) => e.toJson()).toList(),
    if (backendNodeId != null)
      'backendNodeId': backendNodeId!.map((e) => e.toJson()).toList(),
    if (attributes != null)
      'attributes': attributes!.map((e) => e.toJson()).toList(),
    if (textValue != null) 'textValue': textValue!.toJson(),
    if (inputValue != null) 'inputValue': inputValue!.toJson(),
    if (inputChecked != null) 'inputChecked': inputChecked!.toJson(),
    if (optionSelected != null) 'optionSelected': optionSelected!.toJson(),
    if (contentDocumentIndex != null)
      'contentDocumentIndex': contentDocumentIndex!.toJson(),
    if (pseudoType != null) 'pseudoType': pseudoType!.toJson(),
    if (pseudoIdentifier != null)
      'pseudoIdentifier': pseudoIdentifier!.toJson(),
    if (isClickable != null) 'isClickable': isClickable!.toJson(),
    if (currentSourceURL != null)
      'currentSourceURL': currentSourceURL!.toJson(),
    if (originURL != null) 'originURL': originURL!.toJson(),
  };
}