toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'violatedDirective': violatedDirective,
    'isReportOnly': isReportOnly,
    'contentSecurityPolicyViolationType':
        contentSecurityPolicyViolationType.toJson(),
    if (blockedURL != null) 'blockedURL': blockedURL,
    if (frameAncestor != null) 'frameAncestor': frameAncestor!.toJson(),
    if (sourceCodeLocation != null)
      'sourceCodeLocation': sourceCodeLocation!.toJson(),
    if (violatingNodeId != null) 'violatingNodeId': violatingNodeId!.toJson(),
  };
}