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

Side by Side Diff: lib/json/json_frog.dart

Issue 9374030: Move json to lib/json/{json.dart, json_frog.dart} (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « lib/json/json.dart ('k') | samples/belay/bcap/bcap_client.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('json'); 5 #library('json');
6 #import('dart:coreimpl'); 6 #import('dart:coreimpl');
7 7
8 // TODO(jmesserly): this needs cleanup 8 // TODO(jmesserly): this needs cleanup
9 // Ideally JS objects could be treated as Dart Maps directly, and then we can 9 // Ideally JS objects could be treated as Dart Maps directly, and then we can
10 // really use native JSON.parse and JSON.stringify. 10 // really use native JSON.parse and JSON.stringify.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 if (obj is Map<String, Dynamic>) { 80 if (obj is Map<String, Dynamic>) {
81 Map<String, Dynamic> map = obj; 81 Map<String, Dynamic> map = obj;
82 obj = new Object(); 82 obj = new Object();
83 map.forEach((k, v) => _setValue(obj, k, v)); 83 map.forEach((k, v) => _setValue(obj, k, v));
84 return obj; 84 return obj;
85 } 85 }
86 throw new IllegalArgumentException('cannot convert "$value" to JSON'); 86 throw new IllegalArgumentException('cannot convert "$value" to JSON');
87 }); 87 });
88 } 88 }
89 } 89 }
OLDNEW
« no previous file with comments | « lib/json/json.dart ('k') | samples/belay/bcap/bcap_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698