Compartir a través de


value::value Constructor

Constructor creating a null value

_ASYNCRTIMP value();

_ASYNCRTIMP value(
   int32_t value
);

_ASYNCRTIMP value(
   double value
);

_ASYNCRTIMP explicit value(
   bool value
);

_ASYNCRTIMP explicit value(
   utility::string_t
);

_ASYNCRTIMP explicit value(
   const utility::char_t *
);

_ASYNCRTIMP value(
   const value &
);

_ASYNCRTIMP value(
   value &&
);

Parameters

  • value
    The C++ value to create a JSON value from, a C++ STL double-byte string

Remarks

This constructor exists in order to avoid string literals matching another constructor, as is very likely. For example, conversion to bool does not require a user-defined conversion, and will therefore match first, which means that the JSON value turns up as a boolean.

Requirements

Header: json.h

Namespace: web::json

See Also

Reference

value Class