nlohmann::basic_json::clear - renxiaobo27/json GitHub Wiki

void clear();

Description

Removes all elements from the container. The resulting value depends on the different value types and is defined as follows:

Value type JSON value
null null
boolean false
string ""
number 0
object {}
array []

Parameters

None.

Return value

None.

Complexity

Linear in the size of the container.

Exceptions

None. The function's noexcept-specification is noexcept.

See also