nlohmann::basic_json::array

explicitly create an array from an initializer list

Synopsis

Declared in <nlohmann/json.hpp>

[[nodiscard]]
static
basic_json
array(initializer_list_t init = {});

Return Value

a JSON array value with the elements from init

NOTE

The return value should not be discarded.

Parameters

NameDescription
initinitializer list with JSON values to use for the array