Index: tools/coverage.dart |
diff --git a/tools/coverage.dart b/tools/coverage.dart |
index 678fe5743010d3d4e78bc6c45f7a6db697002eff..34018c5482e4289546616507006cfd39b0ab80e0 100644 |
--- a/tools/coverage.dart |
+++ b/tools/coverage.dart |
@@ -15,7 +15,6 @@ |
import "dart:convert"; |
import "dart:io"; |
-import "dart:json" as JSON; |
// Whether or not to print debug target process on the console. |
@@ -311,7 +310,7 @@ class Debugger { |
cleanup(); |
return; |
} |
- var msgObj = JSON.parse(msg); |
+ var msgObj = JSON.decode(msg); |
handleMessage(msgObj); |
if (errorsDetected) { |
error("Error while handling message from coverage target"); |
@@ -343,7 +342,7 @@ class Debugger { |
void sendMessage(Map<String,dynamic> msg) { |
assert(msg["id"] != null); |
msg["id"] = nextMessageId++; |
- String jsonMsg = JSON.stringify(msg); |
+ String jsonMsg = JSON.encode(msg); |
if (verboseWire) print("SEND: $jsonMsg"); |
socket.write(jsonMsg); |
} |
@@ -481,7 +480,7 @@ class JsonBuffer { |
// buffer, or 0 if there is only a partial message in the buffer. |
// The object value must start with '{' and continues to the |
// matching '}'. No attempt is made to otherwise validate the contents |
- // as JSON. If it is invalid, a later JSON.parse() will fail. |
+ // as JSON. If it is invalid, a later JSON.decode() will fail. |
int objectLength() { |
int skipWhitespace(int index) { |
while (index < buffer.length) { |