diff --git a/CHANGELOG.md b/CHANGELOG.md index 8383615c299..44d3fb4f2a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,6 +76,11 @@ [package spec proposal]: https://github.com/lrhn/dep-pkgspec +### VM Service Protocol Changes + +* Some RPCs that didn't include a `"jsonrpc"` property in their responses now + include one. + ## 1.11.2 ### Core library changes diff --git a/runtime/vm/service/message.dart b/runtime/vm/service/message.dart index 631f0a7673a..d54cb4c338f 100644 --- a/runtime/vm/service/message.dart +++ b/runtime/vm/service/message.dart @@ -143,6 +143,7 @@ class Message { void setErrorResponse(String message) { var response = { + 'jsonrpc': '2.0', 'id': serial, 'result' : { 'type': 'Error', diff --git a/runtime/vm/service/vmservice.dart b/runtime/vm/service/vmservice.dart index e6889bbbe01..7d5217ce792 100644 --- a/runtime/vm/service/vmservice.dart +++ b/runtime/vm/service/vmservice.dart @@ -156,6 +156,7 @@ class VMService extends MessageRouter { String _encodeError(Message message, int code, {String details}) { var response = { + 'jsonrpc': '2.0', 'id' : message.serial, 'error' : { 'code': code, @@ -172,6 +173,7 @@ class VMService extends MessageRouter { String _encodeResult(Message message, Map result) { var response = { + 'jsonrpc': '2.0', 'id' : message.serial, 'result' : result, };