diff --git a/src/space/space.h b/src/space/space.h index d4d6881..b6db19b 100644 --- a/src/space/space.h +++ b/src/space/space.h @@ -501,6 +501,27 @@ public: void remove(const std::wstring & field); + template + void serialize_to_string(StreamType & stream) const + { + if( type == type_wstring ) + { + stream << value.value_wstring; + } + else + if( type == type_string ) + { + stream << value.value_string; + } + else + { + serialize_to_json_stream(stream); + } + } + + + + std::string serialize_to_space_str(bool pretty_print = false) const; std::wstring serialize_to_space_wstr(bool pretty_print = false) const; void serialize_to_space_to(std::string & str, bool pretty_print = false) const;