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