Index: dart/site/try/jsonify.dart |
diff --git a/dart/site/try/jsonify.dart b/dart/site/try/jsonify.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..192a8f966e81ec67514e532f5564de5675ddd72f |
--- /dev/null |
+++ b/dart/site/try/jsonify.dart |
@@ -0,0 +1,174 @@ |
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
+// for details. All rights reserved. Use of this source code is governed by a |
+// BSD-style license that can be found in the LICENSE file. |
+ |
+import 'dart:io'; |
+import 'dart:json'; |
+ |
+main() { |
+ var map = {}; |
+ for (String file in SDK_FILES) { |
+ map[file] = new File(file).readAsStringSync(); |
+ } |
+ print(stringify(map)); |
+} |
+ |
+const SDK_FILES = const [ |
+'sdk/lib/_collection_dev/arrays.dart', |
+'sdk/lib/_collection_dev/collection_dev.dart', |
+'sdk/lib/_collection_dev/iterable.dart', |
+'sdk/lib/_collection_dev/list.dart', |
+'sdk/lib/_collection_dev/sort.dart', |
+'sdk/lib/_collection_dev/symbol.dart', |
+'sdk/lib/_collection_dev/to_string.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/async_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/collection_dev_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/collection_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/constant_map.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/core_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/foreign_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/interceptors.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/io_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/isolate_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/js_array.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/js_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/js_number.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/js_rti.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/js_string.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/json_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/math_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/mirrors_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/native_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/regexp_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/scalarlist_patch.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/string_helper.dart', |
+'sdk/lib/_internal/compiler/implementation/lib/typed_data_patch.dart', |
+'sdk/lib/_internal/libraries.dart', |
+'sdk/lib/async/async.dart', |
+'sdk/lib/async/async_error.dart', |
+'sdk/lib/async/deferred_load.dart', |
+'sdk/lib/async/event_loop.dart', |
+'sdk/lib/async/future.dart', |
+'sdk/lib/async/future_impl.dart', |
+'sdk/lib/async/stream.dart', |
+'sdk/lib/async/stream_controller.dart', |
+'sdk/lib/async/stream_impl.dart', |
+'sdk/lib/async/stream_pipe.dart', |
+'sdk/lib/async/timer.dart', |
+'sdk/lib/chrome/dart2js/chrome_dart2js.dart', |
+'sdk/lib/collection/collection.dart', |
+'sdk/lib/collection/collections.dart', |
+'sdk/lib/collection/hash_map.dart', |
+'sdk/lib/collection/hash_set.dart', |
+'sdk/lib/collection/iterable.dart', |
+'sdk/lib/collection/iterator.dart', |
+'sdk/lib/collection/linked_hash_map.dart', |
+'sdk/lib/collection/linked_hash_set.dart', |
+'sdk/lib/collection/list.dart', |
+'sdk/lib/collection/maps.dart', |
+'sdk/lib/collection/queue.dart', |
+'sdk/lib/collection/splay_tree.dart', |
+'sdk/lib/core/bool.dart', |
+'sdk/lib/core/comparable.dart', |
+'sdk/lib/core/core.dart', |
+'sdk/lib/core/date_time.dart', |
+'sdk/lib/core/double.dart', |
+'sdk/lib/core/duration.dart', |
+'sdk/lib/core/errors.dart', |
+'sdk/lib/core/exceptions.dart', |
+'sdk/lib/core/expando.dart', |
+'sdk/lib/core/function.dart', |
+'sdk/lib/core/identical.dart', |
+'sdk/lib/core/int.dart', |
+'sdk/lib/core/invocation.dart', |
+'sdk/lib/core/iterable.dart', |
+'sdk/lib/core/iterator.dart', |
+'sdk/lib/core/list.dart', |
+'sdk/lib/core/map.dart', |
+'sdk/lib/core/num.dart', |
+'sdk/lib/core/object.dart', |
+'sdk/lib/core/pattern.dart', |
+'sdk/lib/core/print.dart', |
+'sdk/lib/core/regexp.dart', |
+'sdk/lib/core/set.dart', |
+'sdk/lib/core/stacktrace.dart', |
+'sdk/lib/core/stopwatch.dart', |
+'sdk/lib/core/string.dart', |
+'sdk/lib/core/string_buffer.dart', |
+'sdk/lib/core/string_sink.dart', |
+'sdk/lib/core/symbol.dart', |
+'sdk/lib/core/type.dart', |
+'sdk/lib/crypto/crypto.dart', |
+'sdk/lib/crypto/crypto_utils.dart', |
+'sdk/lib/crypto/hash_utils.dart', |
+'sdk/lib/crypto/hmac.dart', |
+'sdk/lib/crypto/md5.dart', |
+'sdk/lib/crypto/sha1.dart', |
+'sdk/lib/crypto/sha256.dart', |
+'sdk/lib/html/dart2js/html_dart2js.dart', |
+'sdk/lib/html/html_common/conversions.dart', |
+'sdk/lib/html/html_common/device.dart', |
+'sdk/lib/html/html_common/filtered_element_list.dart', |
+'sdk/lib/html/html_common/html_common.dart', |
+'sdk/lib/html/html_common/html_common_dart2js.dart', |
+'sdk/lib/html/html_common/lists.dart', |
+'sdk/lib/html/html_common/metadata.dart', |
+'sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart', |
+'sdk/lib/io/base64.dart', |
+'sdk/lib/io/buffer_list.dart', |
+'sdk/lib/io/common.dart', |
+'sdk/lib/io/data_transformer.dart', |
+'sdk/lib/io/directory.dart', |
+'sdk/lib/io/directory_impl.dart', |
+'sdk/lib/io/eventhandler.dart', |
+'sdk/lib/io/file.dart', |
+'sdk/lib/io/file_impl.dart', |
+'sdk/lib/io/file_system_entity.dart', |
+'sdk/lib/io/http.dart', |
+'sdk/lib/io/http_body.dart', |
+'sdk/lib/io/http_body_impl.dart', |
+'sdk/lib/io/http_headers.dart', |
+'sdk/lib/io/http_impl.dart', |
+'sdk/lib/io/http_parser.dart', |
+'sdk/lib/io/http_session.dart', |
+'sdk/lib/io/http_utils.dart', |
+'sdk/lib/io/io.dart', |
+'sdk/lib/io/io_sink.dart', |
+'sdk/lib/io/link.dart', |
+'sdk/lib/io/mime_multipart_parser.dart', |
+'sdk/lib/io/options.dart', |
+'sdk/lib/io/path.dart', |
+'sdk/lib/io/path_impl.dart', |
+'sdk/lib/io/platform.dart', |
+'sdk/lib/io/platform_impl.dart', |
+'sdk/lib/io/process.dart', |
+'sdk/lib/io/secure_server_socket.dart', |
+'sdk/lib/io/secure_socket.dart', |
+'sdk/lib/io/socket.dart', |
+'sdk/lib/io/stdio.dart', |
+'sdk/lib/io/string_transformer.dart', |
+'sdk/lib/io/timer_impl.dart', |
+'sdk/lib/io/websocket.dart', |
+'sdk/lib/io/websocket_impl.dart', |
+'sdk/lib/isolate/isolate.dart', |
+'sdk/lib/isolate/isolate_stream.dart', |
+'sdk/lib/json/json.dart', |
+'sdk/lib/math/math.dart', |
+'sdk/lib/math/random.dart', |
+'sdk/lib/mirrors/mirrors.dart', |
+'sdk/lib/svg/dart2js/svg_dart2js.dart', |
+'sdk/lib/typed_data/dart2js/typed_data_dart2js.dart', |
+'sdk/lib/typed_data/typed_data.dart', |
+'sdk/lib/uri/encode_decode.dart', |
+'sdk/lib/uri/helpers.dart', |
+'sdk/lib/uri/uri.dart', |
+'sdk/lib/utf/utf.dart', |
+'sdk/lib/utf/utf16.dart', |
+'sdk/lib/utf/utf32.dart', |
+'sdk/lib/utf/utf8.dart', |
+'sdk/lib/utf/utf_stream.dart', |
+'sdk/lib/web_audio/dart2js/web_audio_dart2js.dart', |
+'sdk/lib/web_gl/dart2js/web_gl_dart2js.dart', |
+'sdk/lib/web_sql/dart2js/web_sql_dart2js.dart', |
+]; |