@override Object toJson() => { if (violations.isNotDefault) 'violations': [for (final i in violations) i.toJson()], };