Closed alan0526 closed 2 weeks ago
Thanks for the suggestion. I've been moving towards adding an int64_t
to the variant so that we can store either an integer or a double, but doubles can exactly represent most integers, so in the short term converting the integer to a double should be a workable solution. I'll add an assignment operator for integers.
OK, thanks.
Support for assigning integers to a glz::json_t
has been added in #1425
// code of glz::json_t val_t difinition using val_t = std::variant<null_t, double, std::string, bool, array_t, object_t>; The val_t type of glz::json_t is a variant and there is not an interger in it. And the assignment operator json_t& operator=(const intgers value) is also not exist. So It is not allowed to assign integers to glz::json_t object.