Space: added pretty_print parameter to some json serializing methods
This commit is contained in:
parent
8c5ede5cf3
commit
7fcfdac52f
|
@ -1474,35 +1474,35 @@ void Space::serialize_to_space_to(std::wstring & str, bool pretty_print) const
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::string Space::serialize_to_json_str() const
|
std::string Space::serialize_to_json_str(bool pretty_print) const
|
||||||
{
|
{
|
||||||
std::string str;
|
std::string str;
|
||||||
serialize_to_json_to(str);
|
serialize_to_json_to(str, pretty_print);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
std::wstring Space::serialize_to_json_wstr() const
|
std::wstring Space::serialize_to_json_wstr(bool pretty_print) const
|
||||||
{
|
{
|
||||||
std::wstring str;
|
std::wstring str;
|
||||||
serialize_to_json_to(str);
|
serialize_to_json_to(str, pretty_print);
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Space::serialize_to_json_to(std::string & str) const
|
void Space::serialize_to_json_to(std::string & str, bool pretty_print) const
|
||||||
{
|
{
|
||||||
TextStream stream;
|
TextStream stream;
|
||||||
serialize_to_json_stream(stream);
|
serialize_to_json_stream(stream, pretty_print);
|
||||||
|
|
||||||
stream.to_str(str);
|
stream.to_str(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Space::serialize_to_json_to(std::wstring & str) const
|
void Space::serialize_to_json_to(std::wstring & str, bool pretty_print) const
|
||||||
{
|
{
|
||||||
WTextStream stream;
|
WTextStream stream;
|
||||||
serialize_to_json_stream(stream);
|
serialize_to_json_stream(stream, pretty_print);
|
||||||
|
|
||||||
stream.to_str(str);
|
stream.to_str(str);
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,10 +555,10 @@ public:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
std::string serialize_to_json_str() const;
|
std::string serialize_to_json_str(bool pretty_print = false) const;
|
||||||
std::wstring serialize_to_json_wstr() const;
|
std::wstring serialize_to_json_wstr(bool pretty_print = false) const;
|
||||||
void serialize_to_json_to(std::string & str) const;
|
void serialize_to_json_to(std::string & str, bool pretty_print = false) const;
|
||||||
void serialize_to_json_to(std::wstring & str) const;
|
void serialize_to_json_to(std::wstring & str, bool pretty_print = false) const;
|
||||||
|
|
||||||
|
|
||||||
template<typename StreamType>
|
template<typename StreamType>
|
||||||
|
|
Loading…
Reference in New Issue