diff --git a/include/jsoncons/basic_json.hpp b/include/jsoncons/basic_json.hpp index 937583539..40e353a40 100644 --- a/include/jsoncons/basic_json.hpp +++ b/include/jsoncons/basic_json.hpp @@ -4369,6 +4369,10 @@ namespace jsoncons { return static_cast(cast().value()); case json_storage_kind::json_const_pointer: return cast().value()->as_double(); + case json_storage_kind::null_value: + return 0; + case json_storage_kind::bool_value: + return cast().value(); default: JSONCONS_THROW(json_runtime_error("Not a double")); }