JsonVariantConst is an immutable version of JsonVariant. Like JsonVariant, it points to a variant in a JsonDocument. The difference is that JsonVariantConst provided only read access to the variant and doesn’t allow modifying the value.

Use this JsonVariantConst in place of JsonVariant when you want to enforce immutability or when you work with a const JsonDocument.

Member functions

JsonVariantConst also support the comparison operators ==, !=, <, <=, >, and >=.

See also