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

Side by Side Diff: runtime/vm/json_stream.h

Issue 18168003: JSONStream and tests (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « no previous file | runtime/vm/json_stream.cc » ('j') | runtime/vm/json_stream.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 #ifndef VM_JSON_STREAM_H_
6 #define VM_JSON_STREAM_H_
7
8 #include "platform/json.h"
9
10 namespace dart {
11
12
13 class JSONStream : ValueObject {
14 public:
15 explicit JSONStream(TextBuffer* buffer);
16 ~JSONStream();
17
18 void Clear();
Ivan Posva 2013/07/01 23:18:14 When do you expect to ever have to call Clear() on
Cutch 2013/07/01 23:33:55 Possibly never. I can remove this.
19
20 void OpenObject();
21 void CloseObject();
22
23 void OpenArray();
24 void CloseArray();
25
26 void PrintValueBool(bool b);
27 void PrintValue(int i);
28 void PrintValue(double d);
29 void PrintValue(const char* s);
30
31 void PrintPropertyBool(const char* name, bool b);
32 void PrintProperty(const char* name, int i);
33 void PrintProperty(const char* name, double d);
34 void PrintProperty(const char* name, const char* s);
35
36 void PrintPropertyName(const char* name);
Ivan Posva 2013/07/01 23:18:14 Shouldn't this be a private?
Cutch 2013/07/01 23:33:55 Not without a change to OpenObject. This is neede
37
38 private:
39 void PrintCommaIfNeeded();
40 bool NeedComma();
41 intptr_t open_objects_;
42 TextBuffer* buffer_;
43 };
44
45 } // namespace dart
46
47 #endif // VM_JSON_STREAM_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/json_stream.cc » ('j') | runtime/vm/json_stream.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698