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

Unified Diff: samples/newissues/newissues.dart

Issue 11783009: Big merge from experimental to bleeding edge. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
« no previous file with comments | « samples/markdown/markdown.dart ('k') | samples/sample_extension/sample_asynchronous_extension.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/newissues/newissues.dart
diff --git a/samples/newissues/newissues.dart b/samples/newissues/newissues.dart
index 99b0f3ce4352a240e5ecae7ac451e06981127c31..cf68a74b581220965c6a3e67d6866fac1b3027be 100644
--- a/samples/newissues/newissues.dart
+++ b/samples/newissues/newissues.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import 'dart:html';
-import 'dart:json';
+import 'dart:json' as jsonlib;
/// Issue wraps JSON structure that describes a bug.
class Issue {
@@ -20,7 +20,7 @@ class Issue {
List<Issue> getIssues(json) {
var issues = json["feed"]["entry"];
if (issues == null) return null;
- return issues.map((data) => new Issue(data));
+ return issues.mappedBy((data) => new Issue(data)).toList();
}
/// Iterates over the recieved issues and construct HTML for them.
@@ -39,7 +39,7 @@ Future<dynamic> requestJson(String url) {
Completer c = new Completer<dynamic>();
void callback(HttpRequest req) {
if (req.readyState == HttpRequest.DONE) {
- c.complete(JSON.parse(req.response));
+ c.complete(jsonlib.parse(req.response));
}
};
new HttpRequest.get(url, callback);
« no previous file with comments | « samples/markdown/markdown.dart ('k') | samples/sample_extension/sample_asynchronous_extension.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698