OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |