LspToolInput.fromJson constructor
Implementation
factory LspToolInput.fromJson(Map<String, dynamic> json) {
final opStr = json['operation'] as String;
final op = LspOperation.fromString(opStr);
if (op == null) {
throw ArgumentError('Invalid LSP operation: $opStr');
}
return LspToolInput(
operation: op,
filePath: json['filePath'] as String,
line: json['line'] as int,
character: json['character'] as int,
);
}