diff options
Diffstat (limited to 'project2/json')
-rw-r--r-- | project2/json/conversion.cpp | 6 | ||||
-rw-r--r-- | project2/json/conversion.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/project2/json/conversion.cpp b/project2/json/conversion.cpp index d13a324..1fae0d3 100644 --- a/project2/json/conversion.cpp +++ b/project2/json/conversion.cpp @@ -11,10 +11,10 @@ json::Value Project2ToJson::operator()(const Null & c) const { json::Value Project2ToJson::operator()(const Glib::ustring & c) const { return c; } - -VariableType JsonToProject2::operator()(const json::Boolean &) const { - throw ConversionNotSupported(); +json::Value Project2ToJson::operator()(const Boolean & c) const { + return c; } + VariableType JsonToProject2::operator()(const json::Object &) const { throw ConversionNotSupported(); } diff --git a/project2/json/conversion.h b/project2/json/conversion.h index acd22fb..31bfc8c 100644 --- a/project2/json/conversion.h +++ b/project2/json/conversion.h @@ -8,6 +8,7 @@ class Project2ToJson : public boost::static_visitor<json::Value> { json::Value operator()(const boost::posix_time::ptime & i) const; json::Value operator()(const Null & c) const; json::Value operator()(const Glib::ustring & c) const; + json::Value operator()(const Boolean & c) const; template <class Numeric> json::Value operator()(const Numeric & i) const { return boost::numeric_cast<json::Number>(i); @@ -16,7 +17,6 @@ class Project2ToJson : public boost::static_visitor<json::Value> { class JsonToProject2 : public boost::static_visitor<VariableType> { public: - VariableType operator()(const json::Boolean &) const; VariableType operator()(const json::Object &) const; VariableType operator()(const json::Array &) const; template <class Copyable> |