toJson method
Encodes this object as JSON-compatible structure.
Example:
import 'dart:convert' show jsonEncode;
final edit = SourceEdit(offset, length, 'replacement string');
final jsonString = jsonEncode(edit.toJson());
print(jsonString);
Implementation
Map<String, dynamic> toJson() {
return {'offset': offset, 'length': length, 'replacement': replacement};
}