template<template< typename U, typename V, typename...Args > class ObjectType = std::map, template< typename U, typename...Args > class ArrayType = std::vector, class StringType = std::string, class BooleanType = bool, class NumberIntegerType = int64_t, class NumberFloatType = double, template< typename U > class AllocatorType = std::allocator></div>
<dlclass="section user"><dt>Requirements</dt><dd>This function satisfies the Container requirements:<ul>
<li>The complexity is constant.</li>
<li>As postcondition, it holds: <code><aclass="el"href="classnlohmann_1_1basic__json_a5a2d4dbcdbc8ea065b87daf52cd786b9.html#a5a2d4dbcdbc8ea065b87daf52cd786b9"title="create a null object (implicitly) ">basic_json()</a>.<aclass="el"href="classnlohmann_1_1basic__json_a572cdf681c75b42c2bc38a1fbe993eca.html#a572cdf681c75b42c2bc38a1fbe993eca"title="checks whether the container is empty ">empty()</a> == true</code>.</li>
</ul>
</dd></dl>
<dlclass="section user"><dt>Example</dt><dd>The following code shows the constructor for a <code>null</code> JSON value. <divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="preprocessor">#include <json.hpp></span></div>
<divclass="line"><aname="l00007"></a><spanclass="lineno"> 7</span> <spanclass="comment">// create a JSON value with default null value</span></div>
<divclass="ttc"id="classnlohmann_1_1basic__json_html"><divclass="ttname"><ahref="classnlohmann_1_1basic__json.html">nlohmann::basic_json</a></div><divclass="ttdoc">a class to store JSON values </div><divclass="ttdef"><b>Definition:</b> json.hpp:121</div></div>
<divclass="ttc"id="namespacenlohmann_html"><divclass="ttname"><ahref="namespacenlohmann.html">nlohmann</a></div><divclass="ttdoc">namespace for Niels Lohmann </div><divclass="ttdef"><b>Definition:</b> json.hpp:56</div></div>
</div><!-- fragment --> Output: <preclass="fragment">null
</pre> The example code above can be translated with<preclass="fragment">g++ -std=c++11 -Isrc doc/examples/basic_json.cpp -o basic_json </pre>.</dd></dl>
<dlclass="section see"><dt>See also</dt><dd><aclass="el"href="classnlohmann_1_1basic__json_a930e14150ffa067bcf56d35cb00271e1.html#a930e14150ffa067bcf56d35cb00271e1"title="create a null object (explicitly) ">basic_json(std::nullptr_t)</a></dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<divid="nav-path"class="navpath"><!-- id is needed for treeview function! -->