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

Side by Side Diff: sdk/lib/convert/codec.dart

Issue 19941002: Remove dart:codec and move classes into dart:convert. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase. Created 7 years, 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 dart.codec; 5 part of dart.convert;
6
7 import 'dart:convert';
8
9 part 'encoding.dart';
10 part 'json.dart';
11 6
12 /** 7 /**
13 * A [Codec] encodes and (if supported) decodes data. 8 * A [Codec] encodes and (if supported) decodes data.
14 * 9 *
15 * Codecs can be fused. For example fusing [JSON] and [UTF8] produces 10 * Codecs can be fused. For example fusing [JSON] and [UTF8] produces
16 * an encoder that can convert Json objects directly to bytes, or can decode 11 * an encoder that can convert Json objects directly to bytes, or can decode
17 * bytes directly to json objects. 12 * bytes directly to json objects.
18 * 13 *
19 * Fused codecs generally attempt to optimize the operations and can be faster 14 * Fused codecs generally attempt to optimize the operations and can be faster
20 * than executing each step of an encoding separately. 15 * than executing each step of an encoding separately.
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 class _InvertedCodec<T, S> extends Codec<T, S> { 93 class _InvertedCodec<T, S> extends Codec<T, S> {
99 final Codec<S, T> _codec; 94 final Codec<S, T> _codec;
100 95
101 _InvertedCodec(Codec<S, T> codec) : _codec = codec; 96 _InvertedCodec(Codec<S, T> codec) : _codec = codec;
102 97
103 Converter<T, S> get encoder => _codec.decoder; 98 Converter<T, S> get encoder => _codec.decoder;
104 Converter<S, T> get decoder => _codec.encoder; 99 Converter<S, T> get decoder => _codec.encoder;
105 100
106 Codec<S, T> get inverted => _codec; 101 Codec<S, T> get inverted => _codec;
107 } 102 }
OLDNEW
« no previous file with comments | « sdk/lib/codec/json.dart ('k') | sdk/lib/convert/convert.dart » ('j') | sdk/lib/convert/json.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698