toJson method

Map<String, dynamic> toJson()

The JSON representation: a rule list plus any warnings.

Implementation

Map<String, dynamic> toJson() => {
      'rules': [for (final m in rules) m.toJson()],
      if (warnings.isNotEmpty) 'warnings': warnings,
    };