toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var complexity = this.complexity;
  var errors = this.errors;
  var expression = this.expression;
  var type = this.type;
  var valid = this.valid;

  final json = <String, Object?>{};
  if (complexity != null) {
    json[r'complexity'] = complexity.toJson();
  }
  json[r'errors'] = errors.map((i) => i.toJson()).toList();
  json[r'expression'] = expression;
  if (type != null) {
    json[r'type'] = type;
  }
  json[r'valid'] = valid;
  return json;
}