toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'file': filePath,
  'startLine': startLine,
  'endLine': endLine,
  'enclosing': enclosingDeclaration,
  'isCleanlyExtractable': isCleanlyExtractable,
  'enclosingScore': enclosingScore,
  'sliceScoreInPlace': sliceScoreInPlace,
  'extractedHelperScore': sliceScoreAtRoot,
  'estimatedEnclosingScoreAfter': estimatedEnclosingScoreAfter,
  'inputs': inputs.map((e) => e.toJson()).toList(),
  'mutations': mutations.map((e) => e.toJson()).toList(),
  'outputs': outputs.map((e) => e.toJson()).toList(),
  'escapes': escapes.map((e) => e.toJson()).toList(),
  if (extractionWarnings.isNotEmpty) 'extractionWarnings': extractionWarnings,
  'suggestedSignature': suggestedSignature,
};