toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
  'schema_version': reportSchemaVersion,
  'file': filePath,
  'start_line': startLine,
  'end_line': endLine,
  'enclosing_declaration': enclosingDeclaration,
  'is_cleanly_extractable': isCleanlyExtractable,
  'enclosing_score': enclosingScore,
  'slice_score_in_place': sliceScoreInPlace,
  'slice_score_at_root': sliceScoreAtRoot,
  'estimated_enclosing_score_after': 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)
    'extraction_warnings': extractionWarnings,
  'suggested_signature': suggestedSignature,
};