toJson method

Map<String, dynamic> toJson()

Converts the error data back to JSON.

Implementation

Map<String, dynamic> toJson() {
  return {
    'errors': errors.map((e) => e.toJson()).toList(),
  };
}