toJson method

  1. @override
Map<String, Object> toJson()

Returns a JSON presentation of the object.

Implementation

@override
Map<String, Object> toJson() {
  var result = <String, Object>{};
  result['initialProblems'] = initialProblems
      .map((RefactoringProblem value) => value.toJson())
      .toList();
  result['optionsProblems'] = optionsProblems
      .map((RefactoringProblem value) => value.toJson())
      .toList();
  result['finalProblems'] = finalProblems
      .map((RefactoringProblem value) => value.toJson())
      .toList();
  var feedback = this.feedback;
  if (feedback != null) {
    result['feedback'] = feedback.toJson();
  }
  var change = this.change;
  if (change != null) {
    result['change'] = change.toJson();
  }
  var potentialEdits = this.potentialEdits;
  if (potentialEdits != null) {
    result['potentialEdits'] = potentialEdits;
  }
  return result;
}