OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef BASE_JSON_JSON_WRITER_H_ | 5 #ifndef BASE_JSON_JSON_WRITER_H_ |
6 #define BASE_JSON_JSON_WRITER_H_ | 6 #define BASE_JSON_JSON_WRITER_H_ |
7 | 7 |
| 8 #include <stddef.h> |
| 9 |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/base_export.h" | 12 #include "base/base_export.h" |
11 #include "base/basictypes.h" | 13 #include "base/macros.h" |
12 | 14 |
13 namespace base { | 15 namespace base { |
14 | 16 |
15 class Value; | 17 class Value; |
16 | 18 |
17 class BASE_EXPORT JSONWriter { | 19 class BASE_EXPORT JSONWriter { |
18 public: | 20 public: |
19 enum Options { | 21 enum Options { |
20 // This option instructs the writer that if a Binary value is encountered, | 22 // This option instructs the writer that if a Binary value is encountered, |
21 // the value (and key if within a dictionary) will be omitted from the | 23 // the value (and key if within a dictionary) will be omitted from the |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 | 64 |
63 // Where we write JSON data as we generate it. | 65 // Where we write JSON data as we generate it. |
64 std::string* json_string_; | 66 std::string* json_string_; |
65 | 67 |
66 DISALLOW_COPY_AND_ASSIGN(JSONWriter); | 68 DISALLOW_COPY_AND_ASSIGN(JSONWriter); |
67 }; | 69 }; |
68 | 70 |
69 } // namespace base | 71 } // namespace base |
70 | 72 |
71 #endif // BASE_JSON_JSON_WRITER_H_ | 73 #endif // BASE_JSON_JSON_WRITER_H_ |
OLD | NEW |