Converts the model to JSON.
Map<String, dynamic> toJson() => { 'errors': errors.map((e) => e.toJson()).toList(), };