|
|
@ -16,18 +16,16 @@ namespace Json { |
|
|
|
|
|
|
|
|
|
|
|
class Serializer { |
|
|
|
class Serializer { |
|
|
|
public: |
|
|
|
public: |
|
|
|
Serializer(const Value& value, const uint32_t indent = 0, const char indentCharacter = ' '); |
|
|
|
Serializer(const uint32_t indent = 0, const char indentCharacter = ' '); |
|
|
|
virtual ~Serializer(); |
|
|
|
virtual ~Serializer(); |
|
|
|
|
|
|
|
|
|
|
|
std::string dump(); |
|
|
|
std::string dump(const Value& value); |
|
|
|
|
|
|
|
|
|
|
|
private: |
|
|
|
private: |
|
|
|
std::string dumpHelper(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
std::string dumpHelper(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
std::string dumpArray(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
std::string dumpArray(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
std::string dumpObject(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
std::string dumpObject(const Value& value, const uint32_t indentLevel = 0); |
|
|
|
|
|
|
|
|
|
|
|
Value m_value; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uint32_t m_indent { 0 }; |
|
|
|
uint32_t m_indent { 0 }; |
|
|
|
char m_indentCharacter { ' ' }; |
|
|
|
char m_indentCharacter { ' ' }; |
|
|
|
}; |
|
|
|
}; |
|
|
|