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

Unified Diff: tests/standalone/debugger/debug_lib.dart

Issue 23596007: Remove usage of dart:json. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase. Created 7 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 side-by-side diff with in-line comments
Download patch
Index: tests/standalone/debugger/debug_lib.dart
diff --git a/tests/standalone/debugger/debug_lib.dart b/tests/standalone/debugger/debug_lib.dart
index 66030d9d28f1e9cbaffcd6ea589b6b83ea89ec47..a5f19ab153efdd97286a7bbbb3e63b54531f89ea 100644
--- a/tests/standalone/debugger/debug_lib.dart
+++ b/tests/standalone/debugger/debug_lib.dart
@@ -10,7 +10,6 @@ import "dart:async";
import "dart:convert";
import "dart:io";
import "dart:math";
-import "dart:json" as JSON;
// Whether or not to print the debugger wire messages on the console.
var verboseWire = false;
@@ -63,7 +62,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) {
@@ -500,7 +499,7 @@ class Debugger {
cleanup();
return;
}
- var msgObj = JSON.parse(msg);
+ var msgObj = JSON.decode(msg);
handleMessage(msgObj);
if (errorsDetected) {
error("Error while handling script entry");
@@ -525,7 +524,7 @@ class Debugger {
if (msg["params"] != null && msg["params"]["isolateId"] != null) {
msg["params"]["isolateId"] = isolateId;
}
- String jsonMsg = JSON.stringify(msg);
+ String jsonMsg = JSON.encode(msg);
if (verboseWire) print("SEND: $jsonMsg");
socket.write(jsonMsg);
}

Powered by Google App Engine
This is Rietveld 408576698