! @brief explicitly create an object from an initializer list Creates a JSON object value from a given initializer list. The initializer lists elements must be pairs, and their first elements must be strings. If the initializer list is empty, the empty object `{}` is created. @note This function is only added for symmetry reasons. In contrast to the related function @ref
| 1758 | @since version 1.0.0 |
| 1759 | */ |
| 1760 | static basic_json object(std::initializer_list<basic_json> init = |
| 1761 | std::initializer_list<basic_json>()) |
| 1762 | { |
| 1763 | return basic_json(init, false, value_t::object); |
| 1764 | } |
| 1765 | |
| 1766 | /*! |
| 1767 | @brief construct an array with count copies of given value |