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

Name

Description

init

initializer list with JSON values to use for the array

Created with MrDocs