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

Unified Diff: samples/swarm/UIState.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: samples/swarm/UIState.dart
diff --git a/samples/swarm/UIState.dart b/samples/swarm/UIState.dart
index 9026b776811955ca16f8f9bfc526df0888d19a50..dffb1c799e69bf6c7c7866b1e2f93003380e24e7 100644
--- a/samples/swarm/UIState.dart
+++ b/samples/swarm/UIState.dart
@@ -35,7 +35,7 @@ abstract class UIState {
// the views for this.
window.history.replaceState(null, document.title, '#');
} else if (state != '') {
- loadFromHistory(json.parse(state));
+ loadFromHistory(JSON.decode(state));
}
firstEvent = false;
});
@@ -55,7 +55,7 @@ abstract class UIState {
throw 'history tracking not started';
}
- String state = json.stringify(toHistory());
+ String state = JSON.encode(toHistory());
// TODO(jmesserly): [state] should be an Object, and we should pass it to
// the state parameter instead of as a #hash URL. Right now we're working

Powered by Google App Engine
This is Rietveld 408576698