Variant
constructor [Variant class]
You can construct a Variant object with a parameter of an explict type to create a variant of that type.
Do not use the const char * or String overloads for binary data; they can only be used for UTF-8 encoded strings.
When passing binary data, use the Buffer to avoid decoding issues when the data is not valid UTF-8 strings. See Buffer for more information.
// PROTOTYPES
Variant();
Variant(const std::monostate& val);
Variant(bool val);
Variant(int val);
Variant(unsigned val);
Variant(long val);
Variant(unsigned long val);
Variant(long val);
Variant(unsigned long val);
Variant(long long val);
Variant(unsigned long long val);
Variant(double val);
Variant(const char* val); // must be a valid UTF-8 string
Variant(String val);
Variant(Buffer val);
Variant(VariantArray val);
Variant(VariantMap val);