![]() |
TerraForge3D
2.3.1
3D Terrain And Landscape Generator
|
|
inline |
add an object to an object
add an object to an object
This function allows to use push_back
with an initializer list. In case
init is converted into an object element and added using push_back(const typename object_t::value_type&). Otherwise, init is converted to a JSON value and added using push_back(basic_json&&).
[in] | init | an initializer list |
@complexity Linear in the size of the initializer list init.
{"key", "value"}
can be both interpreted as object_t::value_type
or std::initializer_list<basic_json>
, see https://github.com/nlohmann/json/issues/235 for more information.@liveexample{The example shows how initializer lists are treated as objects when possible.,push_back__initializer_list}
Definition at line 23312 of file json.hpp.