mirror of https://github.com/CrowCpp/Crow.git
Added a static method which create an empty json value crow::json::wvalue (outputs "{}" instead of a "null" string) (#602)
This commit is contained in:
parent
eef1abe415
commit
215834f8f9
|
@ -1299,6 +1299,9 @@ namespace crow
|
|||
|
||||
type t() const { return t_; }
|
||||
|
||||
/// Create an empty json value (outputs "{}" instead of a "null" string)
|
||||
static crow::json::wvalue empty_object() { return crow::json::wvalue(std::move(crow::json::wvalue::object())); }
|
||||
|
||||
private:
|
||||
type t_{type::Null}; ///< The type of the value.
|
||||
num_type nt{num_type::Null}; ///< The specific type of the number if \ref t_ is a number.
|
||||
|
|
Loading…
Reference in New Issue