diff --git a/json.hpp b/json.hpp index 5f7e42ab..9b23fc00 100644 --- a/json.hpp +++ b/json.hpp @@ -169,6 +169,8 @@ namespace json { virtual bool operator==(const node &rhs) const { return rhs == *this; } + virtual size_t size (void) const { return m_value.size (); } + operator const std::string&(void) const { return m_value; } const std::string& native (void) const { return m_value; } @@ -264,6 +266,13 @@ namespace json { error (_what) { ; } }; + + + template + json::node&& to_json (const T&); + + template + T&& from_json (const json::node&); }