diff --git a/include/crow/json.h b/include/crow/json.h index 05f68b935..a5a23c8e9 100644 --- a/include/crow/json.h +++ b/include/crow/json.h @@ -344,7 +344,7 @@ namespace crow double d() const { #ifndef CROW_JSON_NO_ERROR_CHECK - if (t() != type::Number) + if (t() != type::Number && t() != type::String) throw std::runtime_error("value is not number"); #endif return boost::lexical_cast(start_, end_-start_);