Description

Tells whether the variant contains a value.

Signature

bool isNull() const;

Return value

  • true if the variant is null,
  • false if the variant is valid.

Example

JsonVariant variant;
bool beforeAssign = variant.isNull(); // true
variant = 42;
bool afterAssign = variant.isNull(); // false

See also