@override Object toJson() { return {if (violations.isNotDefault) 'violations': encodeList(violations)}; }