Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(21)

Side by Side Diff: runtime/vm/service/service.md

Issue 1255003003: Make VM service id handling JSON-RPC 2 compliant. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cr Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/service/message.dart ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Dart VM Service Protocol 1.0 (Draft 1) 1 # Dart VM Service Protocol 1.0 (Draft 1)
2 2
3 > Please post feedback to the [observatory-discuss group][discuss-list] 3 > Please post feedback to the [observatory-discuss group][discuss-list]
4 4
5 This document describes _draft 1_ of _version 1.0_ of the Dart VM 5 This document describes _draft 1_ of _version 1.0_ of the Dart VM
6 Service Protocol. This protocol is used to communicate with a running 6 Service Protocol. This protocol is used to communicate with a running
7 Dart Virtual Machine. 7 Dart Virtual Machine.
8 8
9 To use the Service Protocol, start the VM with the *--observe* flag. 9 To use the Service Protocol, start the VM with the *--observe* flag.
10 The VM will start a webserver which services protocol requests via WebSocket. 10 The VM will start a webserver which services protocol requests via WebSocket.
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 ``` 91 ```
92 { 92 {
93 "jsonrpc": "2.0", 93 "jsonrpc": "2.0",
94 "method": "getVersion", 94 "method": "getVersion",
95 "params": {}, 95 "params": {},
96 "id": "1" 96 "id": "1"
97 } 97 }
98 ``` 98 ```
99 99
100 Currently the _id_ property must be a string. The Service Protocol 100 The _id_ property must be a string, number, or `null`. The Service Protocol
101 optionally accepts requests without the _jsonprc_ property. 101 optionally accepts requests without the _jsonprc_ property.
102 102
103 An RPC response is a JSON object (http://json.org/). The response always specifi es an 103 An RPC response is a JSON object (http://json.org/). The response always specifi es an
104 _id_ property to pair it with the corresponding request. If the RPC 104 _id_ property to pair it with the corresponding request. If the RPC
105 was successful, the _result_ property provides the result. 105 was successful, the _result_ property provides the result.
106 106
107 Here is an example response for our [getVersion](#getversion) request above: 107 Here is an example response for our [getVersion](#getversion) request above:
108 108
109 ``` 109 ```
110 { 110 {
(...skipping 1876 matching lines...) Expand 10 before | Expand all | Expand 10 after
1987 ``` 1987 ```
1988 1988
1989 ## Revision History 1989 ## Revision History
1990 1990
1991 version | comments 1991 version | comments
1992 ------- | -------- 1992 ------- | --------
1993 1.0 draft 1 | initial revision 1993 1.0 draft 1 | initial revision
1994 1994
1995 1995
1996 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss 1996 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observato ry-discuss
OLDNEW
« no previous file with comments | « runtime/vm/service/message.dart ('k') | runtime/vm/service_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698