1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 #pragma once
17
19
24
25 #include <utility>
26
27 namespace Aws28 {
29 namespace Utils
30 {
31 namespace Json
32 {
37 {
38 public:
43
49
54
59
64
66
68
70 {
71 return m_value != other.m_value;
72 }
73
75 {
76 return m_value == other.m_value;
77 }
78
84
90
95
100
105 bool GetBool(const char* key) const;
106
111 JsonValue& WithBool(const char* key, bool value);112
117
121 bool AsBool() const;
122
127 int GetInteger(const char* key) const;
128
133 JsonValue& WithInteger(const char* key, int value);134
139
143 int AsInteger() const;
144
148 long long GetInt64(const Aws::String& key) const;149 long long GetInt64(const char* key) const;
150
155 JsonValue& WithInt64(const char* key, long long value);156
161
165 long long AsInt64() const;
166
171 double GetDouble(const char* key) const;
172
177 JsonValue& WithDouble(const char* key, double value);178
183
187 double AsDouble() const;
188
194
200
207
212
219
224
229
234
238 JsonValue GetObject(const char* key) const;240
246
252
257
262
267
273
279 bool ValueExists(const char* key) const;
281
286 Aws::String WriteCompact(bool treatAsObject = true) const;287
291 void WriteCompact(Aws::OStream& ostream, bool treatAsObject = true) const;292
297 Aws::String WriteReadable(bool treatAsObject = true) const;298
302 void WriteReadable(Aws::OStream& ostream, bool treatAsObject = true) const;303
309 {
310 return m_wasParseSuccessful;
311 }
312
317 {
318 return m_errorMessage;
319 }
323 void AppendValue(const JsonValue& value);324
325 bool IsObject() const;
326 bool IsBool() const;
327 bool IsString() const;
328 bool IsIntegerType() const;
329 bool IsFloatingPointType() const;
330 bool IsListType() const;
331
333
334 private:
336
338
340 bool m_wasParseSuccessful;
342 };
343
344 }
345 }
346 }
347
Represents a JSON value.
const Aws::String & GetErrorMessage() const
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_istream< char, std::char_traits< char > > IStream
bool operator==(const JsonValue &other)
bool WasParseSuccessful() const
bool operator!=(const JsonValue &other)
std::basic_ostream< char, std::char_traits< char > > OStream
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::External::Json::Value & ModifyRawValue()
#define AWS_CORE_API
JSON (JavaScript Object Notation).