renderd7/classnlohmann_1_1basic__json.html
2022-04-13 18:07:13 +00:00

11153 lines
854 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Renderd7-nightly: nlohmann::basic_json Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="docsn.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Renderd7-nightly
&#160;<span id="projectnumber">v0.7.0</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('classnlohmann_1_1basic__json.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-types">Private Types</a> &#124;
<a href="#pri-methods">Private Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classnlohmann_1_1basic__json-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">nlohmann::basic_json Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>a class to store JSON values
<a href="classnlohmann_1_1basic__json.html#details">More...</a></p>
<p><code>#include &lt;json.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">union &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">a JSON value <a href="unionnlohmann_1_1basic__json_1_1json__value.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a352187a5ebf3cde865be1b833c18f208"><td class="memItemLeft" align="right" valign="top"><a id="a352187a5ebf3cde865be1b833c18f208"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> = ::<a class="el" href="classnlohmann_1_1json__pointer.html">nlohmann::json_pointer</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:a352187a5ebf3cde865be1b833c18f208"><td class="mdescLeft">&#160;</td><td class="mdescRight">JSON Pointer, see <a class="el" href="classnlohmann_1_1json__pointer.html">nlohmann::json_pointer</a>. <br /></td></tr>
<tr class="separator:a352187a5ebf3cde865be1b833c18f208"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05b1719e15d24c47f4fce69888967d1e"><td class="memItemLeft" align="right" valign="top"><a id="a05b1719e15d24c47f4fce69888967d1e"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a05b1719e15d24c47f4fce69888967d1e">error_handler_t</a> = <a class="el" href="namespacenlohmann_1_1detail.html#a5a76b60b26dc8c47256a996d18d967df">detail::error_handler_t</a></td></tr>
<tr class="memdesc:a05b1719e15d24c47f4fce69888967d1e"><td class="mdescLeft">&#160;</td><td class="mdescRight">how to treat decoding errors <br /></td></tr>
<tr class="separator:a05b1719e15d24c47f4fce69888967d1e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a229d672056243afb8f97ccf1b9df6ff7"><td class="memItemLeft" align="right" valign="top"><a id="a229d672056243afb8f97ccf1b9df6ff7"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a229d672056243afb8f97ccf1b9df6ff7">cbor_tag_handler_t</a> = <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">detail::cbor_tag_handler_t</a></td></tr>
<tr class="memdesc:a229d672056243afb8f97ccf1b9df6ff7"><td class="mdescLeft">&#160;</td><td class="mdescRight">how to treat CBOR tags <br /></td></tr>
<tr class="separator:a229d672056243afb8f97ccf1b9df6ff7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae8b2251872b6a3a9b04147d2ffa5a839"><td class="memItemLeft" align="right" valign="top"><a id="ae8b2251872b6a3a9b04147d2ffa5a839"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> = std::initializer_list&lt; detail::json_ref&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt; &gt;</td></tr>
<tr class="memdesc:ae8b2251872b6a3a9b04147d2ffa5a839"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper type for initializer lists of <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> values <br /></td></tr>
<tr class="separator:ae8b2251872b6a3a9b04147d2ffa5a839"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af229d341abc5e2525a8ca4dc247533e1"><td class="memItemLeft" align="right" valign="top"><a id="af229d341abc5e2525a8ca4dc247533e1"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af229d341abc5e2525a8ca4dc247533e1">json_sax_t</a> = <a class="el" href="structnlohmann_1_1json__sax.html">json_sax</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:af229d341abc5e2525a8ca4dc247533e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">SAX interface type, see <a class="el" href="structnlohmann_1_1json__sax.html">nlohmann::json_sax</a>. <br /></td></tr>
<tr class="separator:af229d341abc5e2525a8ca4dc247533e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d8fbc60f29db1c02fa8ce0828fcdc1d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5d8fbc60f29db1c02fa8ce0828fcdc1d">parse_event_t</a> = <a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1a">detail::parse_event_t</a></td></tr>
<tr class="memdesc:a5d8fbc60f29db1c02fa8ce0828fcdc1d"><td class="mdescLeft">&#160;</td><td class="mdescRight">parser event types <a href="classnlohmann_1_1basic__json.html#a5d8fbc60f29db1c02fa8ce0828fcdc1d">More...</a><br /></td></tr>
<tr class="separator:a5d8fbc60f29db1c02fa8ce0828fcdc1d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87cd77e74fd386d93f26ad04bd01b6a5"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> = detail::parser_callback_t&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:a87cd77e74fd386d93f26ad04bd01b6a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">per-element parser callback type <a href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">More...</a><br /></td></tr>
<tr class="separator:a87cd77e74fd386d93f26ad04bd01b6a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0fb9647ea72df0a3099cf6dd7e3f53e9"><td class="memItemLeft" align="right" valign="top">const JSON_HEDLEY_RETURNS_NON_NULL char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0fb9647ea72df0a3099cf6dd7e3f53e9">type_name</a> () const noexcept</td></tr>
<tr class="memdesc:a0fb9647ea72df0a3099cf6dd7e3f53e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the type as string <a href="classnlohmann_1_1basic__json.html#a0fb9647ea72df0a3099cf6dd7e3f53e9">More...</a><br /></td></tr>
<tr class="separator:a0fb9647ea72df0a3099cf6dd7e3f53e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:af07877930c21c861d75a34cb32993fd0"><td class="memItemLeft" align="right" valign="top"><a id="af07877930c21c861d75a34cb32993fd0"></a>
static <a class="el" href="classnlohmann_1_1basic__json.html#a69388a77648e83007af1295aaf350c0f">allocator_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af07877930c21c861d75a34cb32993fd0">get_allocator</a> ()</td></tr>
<tr class="memdesc:af07877930c21c861d75a34cb32993fd0"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the allocator associated with the container <br /></td></tr>
<tr class="separator:af07877930c21c861d75a34cb32993fd0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651af45dd9d619a3e7524a95388ddb33"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a651af45dd9d619a3e7524a95388ddb33">meta</a> ()</td></tr>
<tr class="memdesc:a651af45dd9d619a3e7524a95388ddb33"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns version information on the library <a href="classnlohmann_1_1basic__json.html#a651af45dd9d619a3e7524a95388ddb33">More...</a><br /></td></tr>
<tr class="separator:a651af45dd9d619a3e7524a95388ddb33"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-types"></a>
Private Types</h2></td></tr>
<tr class="memitem:ae76659f8c2fbeab628a6c618e0817dee"><td class="memItemLeft" align="right" valign="top"><a id="ae76659f8c2fbeab628a6c618e0817dee"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> = NLOHMANN_BASIC_JSON_TPL</td></tr>
<tr class="memdesc:ae76659f8c2fbeab628a6c618e0817dee"><td class="mdescLeft">&#160;</td><td class="mdescRight">workaround type for MSVC <br /></td></tr>
<tr class="separator:ae76659f8c2fbeab628a6c618e0817dee"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-methods"></a>
Private Member Functions</h2></td></tr>
<tr class="memitem:aebf93a806247231640c785fbc6985d10"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aebf93a806247231640c785fbc6985d10">assert_invariant</a> () const noexcept</td></tr>
<tr class="memdesc:aebf93a806247231640c785fbc6985d10"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks the class invariants <a href="classnlohmann_1_1basic__json.html#aebf93a806247231640c785fbc6985d10">More...</a><br /></td></tr>
<tr class="separator:aebf93a806247231640c785fbc6985d10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11bc366554be56ed9832dc25e009acaf"><td class="memItemLeft" align="right" valign="top"><a id="a11bc366554be56ed9832dc25e009acaf"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a11bc366554be56ed9832dc25e009acaf">get_impl</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> *) const</td></tr>
<tr class="memdesc:a11bc366554be56ed9832dc25e009acaf"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a boolean (explicit) <br /></td></tr>
<tr class="separator:a11bc366554be56ed9832dc25e009acaf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a364997745e8a4db417d1c1bfd252ee61"><td class="memItemLeft" align="right" valign="top"><a id="a364997745e8a4db417d1c1bfd252ee61"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a364997745e8a4db417d1c1bfd252ee61">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> *) noexcept</td></tr>
<tr class="memdesc:a364997745e8a4db417d1c1bfd252ee61"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (object) <br /></td></tr>
<tr class="separator:a364997745e8a4db417d1c1bfd252ee61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcaf35277a772216232f82c2ecbe51df"><td class="memItemLeft" align="right" valign="top"><a id="afcaf35277a772216232f82c2ecbe51df"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#afcaf35277a772216232f82c2ecbe51df">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> *) const noexcept</td></tr>
<tr class="memdesc:afcaf35277a772216232f82c2ecbe51df"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (object) <br /></td></tr>
<tr class="separator:afcaf35277a772216232f82c2ecbe51df"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5560b65c43ebfa52fd81363f628f0fd6"><td class="memItemLeft" align="right" valign="top"><a id="a5560b65c43ebfa52fd81363f628f0fd6"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5560b65c43ebfa52fd81363f628f0fd6">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> *) noexcept</td></tr>
<tr class="memdesc:a5560b65c43ebfa52fd81363f628f0fd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (array) <br /></td></tr>
<tr class="separator:a5560b65c43ebfa52fd81363f628f0fd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab882c22809696716a55d6572527709fa"><td class="memItemLeft" align="right" valign="top"><a id="ab882c22809696716a55d6572527709fa"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab882c22809696716a55d6572527709fa">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> *) const noexcept</td></tr>
<tr class="memdesc:ab882c22809696716a55d6572527709fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (array) <br /></td></tr>
<tr class="separator:ab882c22809696716a55d6572527709fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00601649a4242a528f60b9e0c7b89bd6"><td class="memItemLeft" align="right" valign="top"><a id="a00601649a4242a528f60b9e0c7b89bd6"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a00601649a4242a528f60b9e0c7b89bd6">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> *) noexcept</td></tr>
<tr class="memdesc:a00601649a4242a528f60b9e0c7b89bd6"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (string) <br /></td></tr>
<tr class="separator:a00601649a4242a528f60b9e0c7b89bd6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a759e15ae107daa9ca50916aeb5070a18"><td class="memItemLeft" align="right" valign="top"><a id="a759e15ae107daa9ca50916aeb5070a18"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a759e15ae107daa9ca50916aeb5070a18">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> *) const noexcept</td></tr>
<tr class="memdesc:a759e15ae107daa9ca50916aeb5070a18"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (string) <br /></td></tr>
<tr class="separator:a759e15ae107daa9ca50916aeb5070a18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9fc99ec3a40c1e1ee086d797e2f4eec"><td class="memItemLeft" align="right" valign="top"><a id="aa9fc99ec3a40c1e1ee086d797e2f4eec"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aa9fc99ec3a40c1e1ee086d797e2f4eec">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> *) noexcept</td></tr>
<tr class="memdesc:aa9fc99ec3a40c1e1ee086d797e2f4eec"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (boolean) <br /></td></tr>
<tr class="separator:aa9fc99ec3a40c1e1ee086d797e2f4eec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e5c49156b170062c176e520fb6e0002"><td class="memItemLeft" align="right" valign="top"><a id="a7e5c49156b170062c176e520fb6e0002"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7e5c49156b170062c176e520fb6e0002">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> *) const noexcept</td></tr>
<tr class="memdesc:a7e5c49156b170062c176e520fb6e0002"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (boolean) <br /></td></tr>
<tr class="separator:a7e5c49156b170062c176e520fb6e0002"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0c6ae57643e00da7bf6e4d1c29be6db7"><td class="memItemLeft" align="right" valign="top"><a id="a0c6ae57643e00da7bf6e4d1c29be6db7"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0c6ae57643e00da7bf6e4d1c29be6db7">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> *) noexcept</td></tr>
<tr class="memdesc:a0c6ae57643e00da7bf6e4d1c29be6db7"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (integer number) <br /></td></tr>
<tr class="separator:a0c6ae57643e00da7bf6e4d1c29be6db7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae48280c854cad4ff1b466310511d4815"><td class="memItemLeft" align="right" valign="top"><a id="ae48280c854cad4ff1b466310511d4815"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae48280c854cad4ff1b466310511d4815">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> *) const noexcept</td></tr>
<tr class="memdesc:ae48280c854cad4ff1b466310511d4815"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (integer number) <br /></td></tr>
<tr class="separator:ae48280c854cad4ff1b466310511d4815"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a835557fd75998eb3a83254d051498b30"><td class="memItemLeft" align="right" valign="top"><a id="a835557fd75998eb3a83254d051498b30"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a835557fd75998eb3a83254d051498b30">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> *) noexcept</td></tr>
<tr class="memdesc:a835557fd75998eb3a83254d051498b30"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (unsigned number) <br /></td></tr>
<tr class="separator:a835557fd75998eb3a83254d051498b30"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4800ba3349c81c61206add73e2b2e434"><td class="memItemLeft" align="right" valign="top"><a id="a4800ba3349c81c61206add73e2b2e434"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4800ba3349c81c61206add73e2b2e434">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> *) const noexcept</td></tr>
<tr class="memdesc:a4800ba3349c81c61206add73e2b2e434"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (unsigned number) <br /></td></tr>
<tr class="separator:a4800ba3349c81c61206add73e2b2e434"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fabcdab83c0a3de7fb7d753d75ce2bb"><td class="memItemLeft" align="right" valign="top"><a id="a2fabcdab83c0a3de7fb7d753d75ce2bb"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a2fabcdab83c0a3de7fb7d753d75ce2bb">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> *) noexcept</td></tr>
<tr class="memdesc:a2fabcdab83c0a3de7fb7d753d75ce2bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (floating-point number) <br /></td></tr>
<tr class="separator:a2fabcdab83c0a3de7fb7d753d75ce2bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a135cc1f0f25c4ad2ceed7132fc83d8ce"><td class="memItemLeft" align="right" valign="top"><a id="a135cc1f0f25c4ad2ceed7132fc83d8ce"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a135cc1f0f25c4ad2ceed7132fc83d8ce">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> *) const noexcept</td></tr>
<tr class="memdesc:a135cc1f0f25c4ad2ceed7132fc83d8ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (floating-point number) <br /></td></tr>
<tr class="separator:a135cc1f0f25c4ad2ceed7132fc83d8ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1395936ee3b5bf12a44b583ce4c42c9c"><td class="memItemLeft" align="right" valign="top"><a id="a1395936ee3b5bf12a44b583ce4c42c9c"></a>
<a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a1395936ee3b5bf12a44b583ce4c42c9c">get_impl_ptr</a> (<a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> *) noexcept</td></tr>
<tr class="memdesc:a1395936ee3b5bf12a44b583ce4c42c9c"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (binary) <br /></td></tr>
<tr class="separator:a1395936ee3b5bf12a44b583ce4c42c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab71294705ef1df01447c423aac909cc7"><td class="memItemLeft" align="right" valign="top"><a id="ab71294705ef1df01447c423aac909cc7"></a>
constexpr const <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab71294705ef1df01447c423aac909cc7">get_impl_ptr</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> *) const noexcept</td></tr>
<tr class="memdesc:ab71294705ef1df01447c423aac909cc7"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer to the value (binary) <br /></td></tr>
<tr class="separator:ab71294705ef1df01447c423aac909cc7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:ae1303d46f7c21d1b6197db5f3f263ea1"><td class="memTemplParams" colspan="2"><a id="ae1303d46f7c21d1b6197db5f3f263ea1"></a>
template&lt;typename T , typename... Args&gt; </td></tr>
<tr class="memitem:ae1303d46f7c21d1b6197db5f3f263ea1"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_RETURNS_NON_NULL T *&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1">create</a> (Args &amp;&amp;... args)</td></tr>
<tr class="memdesc:ae1303d46f7c21d1b6197db5f3f263ea1"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper for exception-safe object creation <br /></td></tr>
<tr class="separator:ae1303d46f7c21d1b6197db5f3f263ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3999548d7bbac0fdc30960fe38996d2c"><td class="memTemplParams" colspan="2">template&lt;typename ReferenceType , typename ThisType &gt; </td></tr>
<tr class="memitem:a3999548d7bbac0fdc30960fe38996d2c"><td class="memTemplItemLeft" align="right" valign="top">static ReferenceType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3999548d7bbac0fdc30960fe38996d2c">get_ref_impl</a> (ThisType &amp;obj)</td></tr>
<tr class="memdesc:a3999548d7bbac0fdc30960fe38996d2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper function to implement <a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d" title="get a reference value (implicit)">get_ref()</a> <a href="classnlohmann_1_1basic__json.html#a3999548d7bbac0fdc30960fe38996d2c">More...</a><br /></td></tr>
<tr class="separator:a3999548d7bbac0fdc30960fe38996d2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:a5f22d74455ea3e1bb6a8a2c31e6be6be"><td class="memItemLeft" align="right" valign="top"><a id="a5f22d74455ea3e1bb6a8a2c31e6be6be"></a>
<a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5f22d74455ea3e1bb6a8a2c31e6be6be">m_type</a> = <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a37a6259cc0c1dae299a7866489dff0bd">value_t::null</a></td></tr>
<tr class="memdesc:a5f22d74455ea3e1bb6a8a2c31e6be6be"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of the current element <br /></td></tr>
<tr class="separator:a5f22d74455ea3e1bb6a8a2c31e6be6be"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19622cd7064559888959fe0ef3882bea"><td class="memItemLeft" align="right" valign="top"><a id="a19622cd7064559888959fe0ef3882bea"></a>
<a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a19622cd7064559888959fe0ef3882bea">m_value</a> = {}</td></tr>
<tr class="memdesc:a19622cd7064559888959fe0ef3882bea"><td class="mdescLeft">&#160;</td><td class="mdescRight">the value of the current element <br /></td></tr>
<tr class="separator:a19622cd7064559888959fe0ef3882bea"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
exceptions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp19ad27801b95bd1f2c6c2bf83dbb7515"></a>Classes to implement user-defined exceptions. </p>
</td></tr>
<tr class="memitem:ac00185487a16455dfdd53884f678040d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> = <a class="el" href="classnlohmann_1_1detail_1_1exception.html">detail::exception</a></td></tr>
<tr class="memdesc:ac00185487a16455dfdd53884f678040d"><td class="mdescLeft">&#160;</td><td class="mdescRight">general exception of the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class <a href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">More...</a><br /></td></tr>
<tr class="separator:ac00185487a16455dfdd53884f678040d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b1a24eaf07f81ee9cbf01e29cf8fb59"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1parse__error.html">detail::parse_error</a></td></tr>
<tr class="memdesc:a3b1a24eaf07f81ee9cbf01e29cf8fb59"><td class="mdescLeft">&#160;</td><td class="mdescRight">exception indicating a parse error <a href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">More...</a><br /></td></tr>
<tr class="separator:a3b1a24eaf07f81ee9cbf01e29cf8fb59"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e6b5db267db5a283e770296f9e410a0"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html">detail::invalid_iterator</a></td></tr>
<tr class="memdesc:a5e6b5db267db5a283e770296f9e410a0"><td class="mdescLeft">&#160;</td><td class="mdescRight">exception indicating errors with iterators <a href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">More...</a><br /></td></tr>
<tr class="separator:a5e6b5db267db5a283e770296f9e410a0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79473de577bb3f28ef0aa6e9f1571b52"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1type__error.html">detail::type_error</a></td></tr>
<tr class="memdesc:a79473de577bb3f28ef0aa6e9f1571b52"><td class="mdescLeft">&#160;</td><td class="mdescRight">exception indicating executing a member function with a wrong type <a href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">More...</a><br /></td></tr>
<tr class="separator:a79473de577bb3f28ef0aa6e9f1571b52"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e8fc803a09152f3174470ea2375b383"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> = <a class="el" href="classnlohmann_1_1detail_1_1out__of__range.html">detail::out_of_range</a></td></tr>
<tr class="memdesc:a2e8fc803a09152f3174470ea2375b383"><td class="mdescLeft">&#160;</td><td class="mdescRight">exception indicating access out of the defined range <a href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">More...</a><br /></td></tr>
<tr class="separator:a2e8fc803a09152f3174470ea2375b383"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a48d5c5750a7f3164653bd8d3e1e8c893"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1other__error.html">detail::other_error</a></td></tr>
<tr class="memdesc:a48d5c5750a7f3164653bd8d3e1e8c893"><td class="mdescLeft">&#160;</td><td class="mdescRight">exception indicating other library errors <a href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">More...</a><br /></td></tr>
<tr class="separator:a48d5c5750a7f3164653bd8d3e1e8c893"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
container types</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrp6618fa684bc6d5a05e2c88bfff1c0d66"></a>The canonic container types to use <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> like any other STL container. </p>
</td></tr>
<tr class="memitem:a3913219f58349e9be2cb8cc6ddfb3abf"><td class="memItemLeft" align="right" valign="top"><a id="a3913219f58349e9be2cb8cc6ddfb3abf"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3913219f58349e9be2cb8cc6ddfb3abf">value_type</a> = <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a></td></tr>
<tr class="memdesc:a3913219f58349e9be2cb8cc6ddfb3abf"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of elements in a <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> container <br /></td></tr>
<tr class="separator:a3913219f58349e9be2cb8cc6ddfb3abf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af11372ea846fedea8b2098dba7323831"><td class="memItemLeft" align="right" valign="top"><a id="af11372ea846fedea8b2098dba7323831"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> = <a class="el" href="classnlohmann_1_1basic__json.html#a3913219f58349e9be2cb8cc6ddfb3abf">value_type</a> &amp;</td></tr>
<tr class="memdesc:af11372ea846fedea8b2098dba7323831"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of an element reference <br /></td></tr>
<tr class="separator:af11372ea846fedea8b2098dba7323831"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae83ab5539e404c901ab216aafc9dc6d9"><td class="memItemLeft" align="right" valign="top"><a id="ae83ab5539e404c901ab216aafc9dc6d9"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> = const <a class="el" href="classnlohmann_1_1basic__json.html#a3913219f58349e9be2cb8cc6ddfb3abf">value_type</a> &amp;</td></tr>
<tr class="memdesc:ae83ab5539e404c901ab216aafc9dc6d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of an element const reference <br /></td></tr>
<tr class="separator:ae83ab5539e404c901ab216aafc9dc6d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b7596a400a85e2dd7ab22f62df8a340"><td class="memItemLeft" align="right" valign="top"><a id="a9b7596a400a85e2dd7ab22f62df8a340"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a9b7596a400a85e2dd7ab22f62df8a340">difference_type</a> = std::ptrdiff_t</td></tr>
<tr class="memdesc:a9b7596a400a85e2dd7ab22f62df8a340"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type to represent differences between iterators <br /></td></tr>
<tr class="separator:a9b7596a400a85e2dd7ab22f62df8a340"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9eaf1dcc25d6e7bd204f72877cef254b"><td class="memItemLeft" align="right" valign="top"><a id="a9eaf1dcc25d6e7bd204f72877cef254b"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> = std::size_t</td></tr>
<tr class="memdesc:a9eaf1dcc25d6e7bd204f72877cef254b"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type to represent container sizes <br /></td></tr>
<tr class="separator:a9eaf1dcc25d6e7bd204f72877cef254b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69388a77648e83007af1295aaf350c0f"><td class="memItemLeft" align="right" valign="top"><a id="a69388a77648e83007af1295aaf350c0f"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a69388a77648e83007af1295aaf350c0f">allocator_type</a> = AllocatorType&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:a69388a77648e83007af1295aaf350c0f"><td class="mdescLeft">&#160;</td><td class="mdescRight">the allocator type <br /></td></tr>
<tr class="separator:a69388a77648e83007af1295aaf350c0f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ac83a20750a2bfacbf9d30f3e51c3bb"><td class="memItemLeft" align="right" valign="top"><a id="a4ac83a20750a2bfacbf9d30f3e51c3bb"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4ac83a20750a2bfacbf9d30f3e51c3bb">pointer</a> = typename std::allocator_traits&lt; <a class="el" href="classnlohmann_1_1basic__json.html#a69388a77648e83007af1295aaf350c0f">allocator_type</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#a4ac83a20750a2bfacbf9d30f3e51c3bb">pointer</a></td></tr>
<tr class="memdesc:a4ac83a20750a2bfacbf9d30f3e51c3bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of an element pointer <br /></td></tr>
<tr class="separator:a4ac83a20750a2bfacbf9d30f3e51c3bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2c77adc1436dd4c62960d2679e4befee"><td class="memItemLeft" align="right" valign="top"><a id="a2c77adc1436dd4c62960d2679e4befee"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a2c77adc1436dd4c62960d2679e4befee">const_pointer</a> = typename std::allocator_traits&lt; <a class="el" href="classnlohmann_1_1basic__json.html#a69388a77648e83007af1295aaf350c0f">allocator_type</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#a2c77adc1436dd4c62960d2679e4befee">const_pointer</a></td></tr>
<tr class="memdesc:a2c77adc1436dd4c62960d2679e4befee"><td class="mdescLeft">&#160;</td><td class="mdescRight">the type of an element const pointer <br /></td></tr>
<tr class="separator:a2c77adc1436dd4c62960d2679e4befee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3ab6c99db6584c47624c29037f9f14d"><td class="memItemLeft" align="right" valign="top"><a id="aa3ab6c99db6584c47624c29037f9f14d"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html">iter_impl</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:aa3ab6c99db6584c47624c29037f9f14d"><td class="mdescLeft">&#160;</td><td class="mdescRight">an iterator for a <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> container <br /></td></tr>
<tr class="separator:aa3ab6c99db6584c47624c29037f9f14d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a09a580613f00c73015c19e5e7c44ba"><td class="memItemLeft" align="right" valign="top"><a id="a7a09a580613f00c73015c19e5e7c44ba"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html">iter_impl</a>&lt; const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt;</td></tr>
<tr class="memdesc:a7a09a580613f00c73015c19e5e7c44ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">a const iterator for a <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> container <br /></td></tr>
<tr class="separator:a7a09a580613f00c73015c19e5e7c44ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d2df32b8689b776dd3b0865f1362f40"><td class="memItemLeft" align="right" valign="top"><a id="a0d2df32b8689b776dd3b0865f1362f40"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0d2df32b8689b776dd3b0865f1362f40">reverse_iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1json__reverse__iterator.html">json_reverse_iterator</a>&lt; typename <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">basic_json::iterator</a> &gt;</td></tr>
<tr class="memdesc:a0d2df32b8689b776dd3b0865f1362f40"><td class="mdescLeft">&#160;</td><td class="mdescRight">a reverse iterator for a <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> container <br /></td></tr>
<tr class="separator:a0d2df32b8689b776dd3b0865f1362f40"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59564ce7bf7dad8be7d4d8184be05d91"><td class="memItemLeft" align="right" valign="top"><a id="a59564ce7bf7dad8be7d4d8184be05d91"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1json__reverse__iterator.html">json_reverse_iterator</a>&lt; typename <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">basic_json::const_iterator</a> &gt;</td></tr>
<tr class="memdesc:a59564ce7bf7dad8be7d4d8184be05d91"><td class="mdescLeft">&#160;</td><td class="mdescRight">a const reverse iterator for a <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a> container <br /></td></tr>
<tr class="separator:a59564ce7bf7dad8be7d4d8184be05d91"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
JSON value data types</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpbddfba6d49869d59bfd397e65b8cba87"></a>The data types to store a JSON value. These types are derived from the template arguments passed to class <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>. </p>
</td></tr>
<tr class="memitem:af17b737bac7ddaa05c1b6205b1e025c6"><td class="memItemLeft" align="right" valign="top"><a id="af17b737bac7ddaa05c1b6205b1e025c6"></a>
using&#160;</td><td class="memItemRight" valign="bottom"><b>object_comparator_t</b> = std::less&lt; StringType &gt;</td></tr>
<tr class="separator:af17b737bac7ddaa05c1b6205b1e025c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a949272bf6af5eb8eab9675505422f5b3"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> = ObjectType&lt; StringType, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>, object_comparator_t, AllocatorType&lt; std::pair&lt; const StringType, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt; &gt;&gt;</td></tr>
<tr class="memdesc:a949272bf6af5eb8eab9675505422f5b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for an object <a href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">More...</a><br /></td></tr>
<tr class="separator:a949272bf6af5eb8eab9675505422f5b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a69524b1f8f42c0a81b86cee3fc54e034"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> = ArrayType&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>, AllocatorType&lt; <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &gt; &gt;</td></tr>
<tr class="memdesc:a69524b1f8f42c0a81b86cee3fc54e034"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for an array <a href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">More...</a><br /></td></tr>
<tr class="separator:a69524b1f8f42c0a81b86cee3fc54e034"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a561057a2cc70397ad0ab890745d1d7c7"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> = StringType</td></tr>
<tr class="memdesc:a561057a2cc70397ad0ab890745d1d7c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a string <a href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">More...</a><br /></td></tr>
<tr class="separator:a561057a2cc70397ad0ab890745d1d7c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8cc04e22d7ef18efd2d34bc04eb6a1b2"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> = BooleanType</td></tr>
<tr class="memdesc:a8cc04e22d7ef18efd2d34bc04eb6a1b2"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a boolean <a href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">More...</a><br /></td></tr>
<tr class="separator:a8cc04e22d7ef18efd2d34bc04eb6a1b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab227d71ad47b6ed6a3acae52dedbb49d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> = NumberIntegerType</td></tr>
<tr class="memdesc:ab227d71ad47b6ed6a3acae52dedbb49d"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a number (integer) <a href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">More...</a><br /></td></tr>
<tr class="separator:ab227d71ad47b6ed6a3acae52dedbb49d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a440094de5ef4e119b2771b549b33da70"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> = NumberUnsignedType</td></tr>
<tr class="memdesc:a440094de5ef4e119b2771b549b33da70"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a number (unsigned) <a href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">More...</a><br /></td></tr>
<tr class="separator:a440094de5ef4e119b2771b549b33da70"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade1eb06e9fc3ff2ba1efd709b94b401d"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> = NumberFloatType</td></tr>
<tr class="memdesc:ade1eb06e9fc3ff2ba1efd709b94b401d"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a number (floating-point) <a href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">More...</a><br /></td></tr>
<tr class="separator:ade1eb06e9fc3ff2ba1efd709b94b401d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbf51bc13484009ed204bd78a498355e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> = <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html">nlohmann::byte_container_with_subtype</a>&lt; BinaryType &gt;</td></tr>
<tr class="memdesc:acbf51bc13484009ed204bd78a498355e"><td class="mdescLeft">&#160;</td><td class="mdescRight">a type for a packed binary type <a href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">More...</a><br /></td></tr>
<tr class="separator:acbf51bc13484009ed204bd78a498355e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
constructors and destructors</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpd94b4d3d0135946bb7bdf25e48755337"></a>Constructors of class <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>, copy/move constructor, copy assignment, static functions creating objects, and the destructor. </p>
</td></tr>
<tr class="memitem:ab7158658c13c1994c3a1f372f14b22da"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da">binary</a> (const typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;init)</td></tr>
<tr class="memdesc:ab7158658c13c1994c3a1f372f14b22da"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create a binary array (without subtype) <a href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da">More...</a><br /></td></tr>
<tr class="separator:ab7158658c13c1994c3a1f372f14b22da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5a4db4fa614a68f5a99ff0eadc059d4"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af5a4db4fa614a68f5a99ff0eadc059d4">binary</a> (const typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;init, std::uint8_t subtype)</td></tr>
<tr class="memdesc:af5a4db4fa614a68f5a99ff0eadc059d4"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create a binary array (with subtype) <a href="classnlohmann_1_1basic__json.html#af5a4db4fa614a68f5a99ff0eadc059d4">More...</a><br /></td></tr>
<tr class="separator:af5a4db4fa614a68f5a99ff0eadc059d4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82351bc959539638a4066fbb31249736"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a82351bc959539638a4066fbb31249736">binary</a> (typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&amp;init)</td></tr>
<tr class="memdesc:a82351bc959539638a4066fbb31249736"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create a binary array (without subtype) <a href="classnlohmann_1_1basic__json.html#a82351bc959539638a4066fbb31249736">More...</a><br /></td></tr>
<tr class="separator:a82351bc959539638a4066fbb31249736"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acde0d3501daee16863f626cc90b3a098"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#acde0d3501daee16863f626cc90b3a098">binary</a> (typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&amp;init, std::uint8_t subtype)</td></tr>
<tr class="memdesc:acde0d3501daee16863f626cc90b3a098"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create a binary array (with subtype) <a href="classnlohmann_1_1basic__json.html#acde0d3501daee16863f626cc90b3a098">More...</a><br /></td></tr>
<tr class="separator:acde0d3501daee16863f626cc90b3a098"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aea7fc2a66a785e2f68535f63b54150a9"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> init={})</td></tr>
<tr class="memdesc:aea7fc2a66a785e2f68535f63b54150a9"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create an array from an initializer list <a href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">More...</a><br /></td></tr>
<tr class="separator:aea7fc2a66a785e2f68535f63b54150a9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a10c8164cc94feabf095b959633c0d709"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">object</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> init={})</td></tr>
<tr class="memdesc:a10c8164cc94feabf095b959633c0d709"><td class="mdescLeft">&#160;</td><td class="mdescRight">explicitly create an object from an initializer list <a href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">More...</a><br /></td></tr>
<tr class="separator:a10c8164cc94feabf095b959633c0d709"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad886f4baa2efb7ac6b0ca70dc72f3d18"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json</a> (const <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> v)</td></tr>
<tr class="memdesc:ad886f4baa2efb7ac6b0ca70dc72f3d18"><td class="mdescLeft">&#160;</td><td class="mdescRight">create an empty value with a given type <a href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">More...</a><br /></td></tr>
<tr class="separator:ad886f4baa2efb7ac6b0ca70dc72f3d18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9126e2860908bc6aa34da0063863070e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a9126e2860908bc6aa34da0063863070e">basic_json</a> (std::nullptr_t=nullptr) noexcept</td></tr>
<tr class="memdesc:a9126e2860908bc6aa34da0063863070e"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a null object <a href="classnlohmann_1_1basic__json.html#a9126e2860908bc6aa34da0063863070e">More...</a><br /></td></tr>
<tr class="separator:a9126e2860908bc6aa34da0063863070e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6365d9b23fd9c554d9fc89121c4df4d0"><td class="memTemplParams" colspan="2">template&lt;typename CompatibleType , typename U = detail::uncvref_t&lt;CompatibleType&gt;, detail::enable_if_t&lt; !detail::is_basic_json&lt; U &gt;::value &amp;&amp;detail::is_compatible_type&lt; basic_json_t, U &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a6365d9b23fd9c554d9fc89121c4df4d0"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a6365d9b23fd9c554d9fc89121c4df4d0">basic_json</a> (CompatibleType &amp;&amp;val) noexcept(noexcept(JSONSerializer&lt; U &gt;::to_json(std::declval&lt; <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;(), std::forward&lt; CompatibleType &gt;(val))))</td></tr>
<tr class="memdesc:a6365d9b23fd9c554d9fc89121c4df4d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a JSON value <a href="classnlohmann_1_1basic__json.html#a6365d9b23fd9c554d9fc89121c4df4d0">More...</a><br /></td></tr>
<tr class="separator:a6365d9b23fd9c554d9fc89121c4df4d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad0cf7682c00f137bec6a5a680a80dc6e"><td class="memTemplParams" colspan="2">template&lt;typename BasicJsonType , detail::enable_if_t&lt; detail::is_basic_json&lt; BasicJsonType &gt;::value &amp;&amp;!std::is_same&lt; basic_json, BasicJsonType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:ad0cf7682c00f137bec6a5a680a80dc6e"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad0cf7682c00f137bec6a5a680a80dc6e">basic_json</a> (const BasicJsonType &amp;val)</td></tr>
<tr class="memdesc:ad0cf7682c00f137bec6a5a680a80dc6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a JSON value from an existing one <a href="classnlohmann_1_1basic__json.html#ad0cf7682c00f137bec6a5a680a80dc6e">More...</a><br /></td></tr>
<tr class="separator:ad0cf7682c00f137bec6a5a680a80dc6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6b3135f51d4e240e541af2f9d0b16ad9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> init, bool type_deduction=true, <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> manual_type=<a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985af1f713c9e000f5d3f280adbd124df4f5">value_t::array</a>)</td></tr>
<tr class="memdesc:a6b3135f51d4e240e541af2f9d0b16ad9"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a container (array or object) from an initializer list <a href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">More...</a><br /></td></tr>
<tr class="separator:a6b3135f51d4e240e541af2f9d0b16ad9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacff7cb1f9097fcb1f8f97d401220ac0"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aacff7cb1f9097fcb1f8f97d401220ac0">basic_json</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> cnt, const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;val)</td></tr>
<tr class="memdesc:aacff7cb1f9097fcb1f8f97d401220ac0"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct an array with count copies of given value <a href="classnlohmann_1_1basic__json.html#aacff7cb1f9097fcb1f8f97d401220ac0">More...</a><br /></td></tr>
<tr class="separator:aacff7cb1f9097fcb1f8f97d401220ac0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3fb693444043639e08ff7be62410b137"><td class="memTemplParams" colspan="2">template&lt;class InputIT , typename std::enable_if&lt; std::is_same&lt; InputIT, typename basic_json_t::iterator &gt;::value||std::is_same&lt; InputIT, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a3fb693444043639e08ff7be62410b137"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3fb693444043639e08ff7be62410b137">basic_json</a> (InputIT first, InputIT last)</td></tr>
<tr class="memdesc:a3fb693444043639e08ff7be62410b137"><td class="mdescLeft">&#160;</td><td class="mdescRight">construct a JSON container given an iterator range <a href="classnlohmann_1_1basic__json.html#a3fb693444043639e08ff7be62410b137">More...</a><br /></td></tr>
<tr class="separator:a3fb693444043639e08ff7be62410b137"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9b3c3c9ea1a0530f515d5be9ae77022c"><td class="memTemplParams" colspan="2"><a id="a9b3c3c9ea1a0530f515d5be9ae77022c"></a>
template&lt;typename JsonRef , detail::enable_if_t&lt; detail::conjunction&lt; detail::is_json_ref&lt; JsonRef &gt;, std::is_same&lt; typename JsonRef::value_type, basic_json &gt;&gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a9b3c3c9ea1a0530f515d5be9ae77022c"><td class="memTemplItemLeft" align="right" valign="top">&#160;</td><td class="memTemplItemRight" valign="bottom"><b>basic_json</b> (const JsonRef &amp;ref)</td></tr>
<tr class="separator:a9b3c3c9ea1a0530f515d5be9ae77022c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af21eb13ca205fb51e267e6f7ee269229"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af21eb13ca205fb51e267e6f7ee269229">basic_json</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;other)</td></tr>
<tr class="memdesc:af21eb13ca205fb51e267e6f7ee269229"><td class="mdescLeft">&#160;</td><td class="mdescRight">copy constructor <a href="classnlohmann_1_1basic__json.html#af21eb13ca205fb51e267e6f7ee269229">More...</a><br /></td></tr>
<tr class="separator:af21eb13ca205fb51e267e6f7ee269229"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a758a9350d03d6eb90a9cb0bf4653d286"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a758a9350d03d6eb90a9cb0bf4653d286">basic_json</a> (<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;other) noexcept</td></tr>
<tr class="memdesc:a758a9350d03d6eb90a9cb0bf4653d286"><td class="mdescLeft">&#160;</td><td class="mdescRight">move constructor <a href="classnlohmann_1_1basic__json.html#a758a9350d03d6eb90a9cb0bf4653d286">More...</a><br /></td></tr>
<tr class="separator:a758a9350d03d6eb90a9cb0bf4653d286"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa39eda8a41872fe4b022855e27fac90d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aa39eda8a41872fe4b022855e27fac90d">operator=</a> (<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> other) noexcept(std::is_nothrow_move_constructible&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_constructible&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a>)</td></tr>
<tr class="memdesc:aa39eda8a41872fe4b022855e27fac90d"><td class="mdescLeft">&#160;</td><td class="mdescRight">copy assignment <a href="classnlohmann_1_1basic__json.html#aa39eda8a41872fe4b022855e27fac90d">More...</a><br /></td></tr>
<tr class="separator:aa39eda8a41872fe4b022855e27fac90d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d35fcb7c72f755a30ae433e58083eca"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7d35fcb7c72f755a30ae433e58083eca">~basic_json</a> () noexcept</td></tr>
<tr class="memdesc:a7d35fcb7c72f755a30ae433e58083eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">destructor <a href="classnlohmann_1_1basic__json.html#a7d35fcb7c72f755a30ae433e58083eca">More...</a><br /></td></tr>
<tr class="separator:a7d35fcb7c72f755a30ae433e58083eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
object inspection</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpbbb01a37b8f261ae5b5799058dcac1a0"></a>Functions to inspect the type of a JSON value. </p>
</td></tr>
<tr class="memitem:acfc564f36da667b7d9109879d34dc36c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump</a> (const int indent=-1, const char indent_char=' ', const bool ensure_ascii=false, const <a class="el" href="namespacenlohmann_1_1detail.html#a5a76b60b26dc8c47256a996d18d967df">error_handler_t</a> error_handler=error_handler_t::strict) const</td></tr>
<tr class="memdesc:acfc564f36da667b7d9109879d34dc36c"><td class="mdescLeft">&#160;</td><td class="mdescRight">serialization <a href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">More...</a><br /></td></tr>
<tr class="separator:acfc564f36da667b7d9109879d34dc36c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a530ad60b7fb590e0ee45b6803144cc00"><td class="memItemLeft" align="right" valign="top">constexpr <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">type</a> () const noexcept</td></tr>
<tr class="memdesc:a530ad60b7fb590e0ee45b6803144cc00"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the type of the JSON value (explicit) <a href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">More...</a><br /></td></tr>
<tr class="separator:a530ad60b7fb590e0ee45b6803144cc00"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a422885c85f603a13c36f8d0ac5d9f278"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a422885c85f603a13c36f8d0ac5d9f278">is_primitive</a> () const noexcept</td></tr>
<tr class="memdesc:a422885c85f603a13c36f8d0ac5d9f278"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether type is primitive <a href="classnlohmann_1_1basic__json.html#a422885c85f603a13c36f8d0ac5d9f278">More...</a><br /></td></tr>
<tr class="separator:a422885c85f603a13c36f8d0ac5d9f278"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a53e5a09d9123bfeed6f664b1334f8c"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5a53e5a09d9123bfeed6f664b1334f8c">is_structured</a> () const noexcept</td></tr>
<tr class="memdesc:a5a53e5a09d9123bfeed6f664b1334f8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether type is structured <a href="classnlohmann_1_1basic__json.html#a5a53e5a09d9123bfeed6f664b1334f8c">More...</a><br /></td></tr>
<tr class="separator:a5a53e5a09d9123bfeed6f664b1334f8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe9a6fe72337a174cfb117a2081d2cfc"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#afe9a6fe72337a174cfb117a2081d2cfc">is_null</a> () const noexcept</td></tr>
<tr class="memdesc:afe9a6fe72337a174cfb117a2081d2cfc"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is null <a href="classnlohmann_1_1basic__json.html#afe9a6fe72337a174cfb117a2081d2cfc">More...</a><br /></td></tr>
<tr class="separator:afe9a6fe72337a174cfb117a2081d2cfc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0bd23e6f679145905a78020c07547559"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0bd23e6f679145905a78020c07547559">is_boolean</a> () const noexcept</td></tr>
<tr class="memdesc:a0bd23e6f679145905a78020c07547559"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is a boolean <a href="classnlohmann_1_1basic__json.html#a0bd23e6f679145905a78020c07547559">More...</a><br /></td></tr>
<tr class="separator:a0bd23e6f679145905a78020c07547559"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d5f20be10c6f6d263557def2ac504a3"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">is_number</a> () const noexcept</td></tr>
<tr class="memdesc:a5d5f20be10c6f6d263557def2ac504a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is a number <a href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">More...</a><br /></td></tr>
<tr class="separator:a5d5f20be10c6f6d263557def2ac504a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a145005bad4fcab4f8620efec8de019ad"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad">is_number_integer</a> () const noexcept</td></tr>
<tr class="memdesc:a145005bad4fcab4f8620efec8de019ad"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is an integer number <a href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad">More...</a><br /></td></tr>
<tr class="separator:a145005bad4fcab4f8620efec8de019ad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac45bc02fd5f4f136f522844222012adc"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc">is_number_unsigned</a> () const noexcept</td></tr>
<tr class="memdesc:ac45bc02fd5f4f136f522844222012adc"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is an unsigned integer number <a href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc">More...</a><br /></td></tr>
<tr class="separator:ac45bc02fd5f4f136f522844222012adc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a926df0038ca14568f88a92d0caeba044"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044">is_number_float</a> () const noexcept</td></tr>
<tr class="memdesc:a926df0038ca14568f88a92d0caeba044"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is a floating-point number <a href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044">More...</a><br /></td></tr>
<tr class="separator:a926df0038ca14568f88a92d0caeba044"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3300a95d3bb4a55cb0e04b9f125e42f"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae3300a95d3bb4a55cb0e04b9f125e42f">is_object</a> () const noexcept</td></tr>
<tr class="memdesc:ae3300a95d3bb4a55cb0e04b9f125e42f"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is an object <a href="classnlohmann_1_1basic__json.html#ae3300a95d3bb4a55cb0e04b9f125e42f">More...</a><br /></td></tr>
<tr class="separator:ae3300a95d3bb4a55cb0e04b9f125e42f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1859e0c783a24df797b758e3fc21b966"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a1859e0c783a24df797b758e3fc21b966">is_array</a> () const noexcept</td></tr>
<tr class="memdesc:a1859e0c783a24df797b758e3fc21b966"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is an array <a href="classnlohmann_1_1basic__json.html#a1859e0c783a24df797b758e3fc21b966">More...</a><br /></td></tr>
<tr class="separator:a1859e0c783a24df797b758e3fc21b966"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae958b0bc067c82850145299711d8bcd5"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae958b0bc067c82850145299711d8bcd5">is_string</a> () const noexcept</td></tr>
<tr class="memdesc:ae958b0bc067c82850145299711d8bcd5"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is a string <a href="classnlohmann_1_1basic__json.html#ae958b0bc067c82850145299711d8bcd5">More...</a><br /></td></tr>
<tr class="separator:ae958b0bc067c82850145299711d8bcd5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af0623f174dc806b5c17b87a485febf68"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68">is_binary</a> () const noexcept</td></tr>
<tr class="memdesc:af0623f174dc806b5c17b87a485febf68"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is a binary array <a href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68">More...</a><br /></td></tr>
<tr class="separator:af0623f174dc806b5c17b87a485febf68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fce66d66c424052b192ba45e08a661d"><td class="memItemLeft" align="right" valign="top">constexpr bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4fce66d66c424052b192ba45e08a661d">is_discarded</a> () const noexcept</td></tr>
<tr class="memdesc:a4fce66d66c424052b192ba45e08a661d"><td class="mdescLeft">&#160;</td><td class="mdescRight">return whether value is discarded <a href="classnlohmann_1_1basic__json.html#a4fce66d66c424052b192ba45e08a661d">More...</a><br /></td></tr>
<tr class="separator:a4fce66d66c424052b192ba45e08a661d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a568197da17e5f7f9889607a2524497c6"><td class="memItemLeft" align="right" valign="top">constexpr&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a568197da17e5f7f9889607a2524497c6">operator value_t</a> () const noexcept</td></tr>
<tr class="memdesc:a568197da17e5f7f9889607a2524497c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">return the type of the JSON value (implicit) <a href="classnlohmann_1_1basic__json.html#a568197da17e5f7f9889607a2524497c6">More...</a><br /></td></tr>
<tr class="separator:a568197da17e5f7f9889607a2524497c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
value access</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpd8f53c9caf18314e5b3f758245606995"></a>Direct access to the stored value of a JSON value. </p>
</td></tr>
<tr class="memitem:adc6408fbeaf9545882dc62bc20db7d42"><td class="memTemplParams" colspan="2">template&lt;typename BasicJsonType , detail::enable_if_t&lt; std::is_same&lt; typename std::remove_const&lt; BasicJsonType &gt;::type, basic_json_t &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:adc6408fbeaf9545882dc62bc20db7d42"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#adc6408fbeaf9545882dc62bc20db7d42">get</a> () const</td></tr>
<tr class="memdesc:adc6408fbeaf9545882dc62bc20db7d42"><td class="mdescLeft">&#160;</td><td class="mdescRight">get special-case overload <a href="classnlohmann_1_1basic__json.html#adc6408fbeaf9545882dc62bc20db7d42">More...</a><br /></td></tr>
<tr class="separator:adc6408fbeaf9545882dc62bc20db7d42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad6d521a14fe494fb08bea79cfaaa9b46"><td class="memTemplParams" colspan="2">template&lt;typename BasicJsonType , detail::enable_if_t&lt; !std::is_same&lt; BasicJsonType, basic_json &gt;::value &amp;&amp;detail::is_basic_json&lt; BasicJsonType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:ad6d521a14fe494fb08bea79cfaaa9b46"><td class="memTemplItemLeft" align="right" valign="top">BasicJsonType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad6d521a14fe494fb08bea79cfaaa9b46">get</a> () const</td></tr>
<tr class="memdesc:ad6d521a14fe494fb08bea79cfaaa9b46"><td class="mdescLeft">&#160;</td><td class="mdescRight">get special-case overload <a href="classnlohmann_1_1basic__json.html#ad6d521a14fe494fb08bea79cfaaa9b46">More...</a><br /></td></tr>
<tr class="separator:ad6d521a14fe494fb08bea79cfaaa9b46"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e3fba99f98f8b7c54b7e657f02162c9"><td class="memTemplParams" colspan="2">template&lt;typename ValueTypeCV , typename ValueType = detail::uncvref_t&lt;ValueTypeCV&gt;, detail::enable_if_t&lt; !detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;detail::has_from_json&lt; basic_json_t, ValueType &gt;::value &amp;&amp;!detail::has_non_default_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a0e3fba99f98f8b7c54b7e657f02162c9"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0e3fba99f98f8b7c54b7e657f02162c9">get</a> () const noexcept(noexcept(JSONSerializer&lt; ValueType &gt;::from_json(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;(), std::declval&lt; ValueType &amp; &gt;())))</td></tr>
<tr class="memdesc:a0e3fba99f98f8b7c54b7e657f02162c9"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a value (explicit) <a href="classnlohmann_1_1basic__json.html#a0e3fba99f98f8b7c54b7e657f02162c9">More...</a><br /></td></tr>
<tr class="separator:a0e3fba99f98f8b7c54b7e657f02162c9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac973fb8b3bf1fb60d1b8df880060c3"><td class="memTemplParams" colspan="2">template&lt;typename ValueTypeCV , typename ValueType = detail::uncvref_t&lt;ValueTypeCV&gt;, detail::enable_if_t&lt; !std::is_same&lt; basic_json_t, ValueType &gt;::value &amp;&amp;detail::has_non_default_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a0ac973fb8b3bf1fb60d1b8df880060c3"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0ac973fb8b3bf1fb60d1b8df880060c3">get</a> () const noexcept(noexcept(JSONSerializer&lt; ValueType &gt;::from_json(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;())))</td></tr>
<tr class="memdesc:a0ac973fb8b3bf1fb60d1b8df880060c3"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a value (explicit); special case <a href="classnlohmann_1_1basic__json.html#a0ac973fb8b3bf1fb60d1b8df880060c3">More...</a><br /></td></tr>
<tr class="separator:a0ac973fb8b3bf1fb60d1b8df880060c3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24f07b19d83414f342b204da5a400363"><td class="memTemplParams" colspan="2">template&lt;typename ValueType , detail::enable_if_t&lt; !detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;detail::has_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a24f07b19d83414f342b204da5a400363"><td class="memTemplItemLeft" align="right" valign="top">ValueType &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a24f07b19d83414f342b204da5a400363">get_to</a> (ValueType &amp;v) const noexcept(noexcept(JSONSerializer&lt; ValueType &gt;::from_json(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;(), v)))</td></tr>
<tr class="memdesc:a24f07b19d83414f342b204da5a400363"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a value (explicit) <a href="classnlohmann_1_1basic__json.html#a24f07b19d83414f342b204da5a400363">More...</a><br /></td></tr>
<tr class="separator:a24f07b19d83414f342b204da5a400363"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8477b6e6219ddcb6a952447f12a681c5"><td class="memTemplParams" colspan="2"><a id="a8477b6e6219ddcb6a952447f12a681c5"></a>
template&lt;typename ValueType , detail::enable_if_t&lt; detail::is_basic_json&lt; ValueType &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:a8477b6e6219ddcb6a952447f12a681c5"><td class="memTemplItemLeft" align="right" valign="top">ValueType &amp;&#160;</td><td class="memTemplItemRight" valign="bottom"><b>get_to</b> (ValueType &amp;v) const</td></tr>
<tr class="separator:a8477b6e6219ddcb6a952447f12a681c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaca828acdba11b390de87689ac18fd08"><td class="memTemplParams" colspan="2"><a id="aaca828acdba11b390de87689ac18fd08"></a>
template&lt;typename T , std::size_t N, typename Array = T (&amp;)[N], detail::enable_if_t&lt; detail::has_from_json&lt; basic_json_t, Array &gt;::value, int &gt; = 0&gt; </td></tr>
<tr class="memitem:aaca828acdba11b390de87689ac18fd08"><td class="memTemplItemLeft" align="right" valign="top">Array&#160;</td><td class="memTemplItemRight" valign="bottom"><b>get_to</b> (T(&amp;v)[N]) const noexcept(noexcept(JSONSerializer&lt; Array &gt;::from_json(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;(), v)))</td></tr>
<tr class="separator:aaca828acdba11b390de87689ac18fd08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e639075f5b3f1733fcb5f04aea3da95"><td class="memTemplParams" colspan="2">template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a9e639075f5b3f1733fcb5f04aea3da95"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr</a> () noexcept -&gt; decltype(std::declval&lt; <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;().<a class="el" href="classnlohmann_1_1basic__json.html#a364997745e8a4db417d1c1bfd252ee61">get_impl_ptr</a>(std::declval&lt; PointerType &gt;()))</td></tr>
<tr class="memdesc:a9e639075f5b3f1733fcb5f04aea3da95"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer value (implicit) <a href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">More...</a><br /></td></tr>
<tr class="separator:a9e639075f5b3f1733fcb5f04aea3da95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abad0f48fa4535a8820e90509b733f16b"><td class="memTemplParams" colspan="2">template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value &amp;&amp;std::is_const&lt; typename std::remove_pointer&lt; PointerType &gt;::type &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:abad0f48fa4535a8820e90509b733f16b"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abad0f48fa4535a8820e90509b733f16b">get_ptr</a> () const noexcept -&gt; decltype(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;().<a class="el" href="classnlohmann_1_1basic__json.html#a364997745e8a4db417d1c1bfd252ee61">get_impl_ptr</a>(std::declval&lt; PointerType &gt;()))</td></tr>
<tr class="memdesc:abad0f48fa4535a8820e90509b733f16b"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer value (implicit) <a href="classnlohmann_1_1basic__json.html#abad0f48fa4535a8820e90509b733f16b">More...</a><br /></td></tr>
<tr class="separator:abad0f48fa4535a8820e90509b733f16b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19e7e8e1811dcbfb35d1855a24abd8aa"><td class="memTemplParams" colspan="2">template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a19e7e8e1811dcbfb35d1855a24abd8aa"><td class="memTemplItemLeft" align="right" valign="top">auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a19e7e8e1811dcbfb35d1855a24abd8aa">get</a> () noexcept -&gt; decltype(std::declval&lt; <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;().template <a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr</a>&lt; PointerType &gt;())</td></tr>
<tr class="memdesc:a19e7e8e1811dcbfb35d1855a24abd8aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer value (explicit) <a href="classnlohmann_1_1basic__json.html#a19e7e8e1811dcbfb35d1855a24abd8aa">More...</a><br /></td></tr>
<tr class="separator:a19e7e8e1811dcbfb35d1855a24abd8aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37a6d7eaf9d736a890adb6e9f1444fde"><td class="memTemplParams" colspan="2">template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a37a6d7eaf9d736a890adb6e9f1444fde"><td class="memTemplItemLeft" align="right" valign="top">constexpr auto&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a37a6d7eaf9d736a890adb6e9f1444fde">get</a> () const noexcept -&gt; decltype(std::declval&lt; const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a> &amp; &gt;().template <a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr</a>&lt; PointerType &gt;())</td></tr>
<tr class="memdesc:a37a6d7eaf9d736a890adb6e9f1444fde"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a pointer value (explicit) <a href="classnlohmann_1_1basic__json.html#a37a6d7eaf9d736a890adb6e9f1444fde">More...</a><br /></td></tr>
<tr class="separator:a37a6d7eaf9d736a890adb6e9f1444fde"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a838359d25d318852c8204b999e5f375d"><td class="memTemplParams" colspan="2">template&lt;typename ReferenceType , typename std::enable_if&lt; std::is_reference&lt; ReferenceType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a838359d25d318852c8204b999e5f375d"><td class="memTemplItemLeft" align="right" valign="top">ReferenceType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d">get_ref</a> ()</td></tr>
<tr class="memdesc:a838359d25d318852c8204b999e5f375d"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a reference value (implicit) <a href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d">More...</a><br /></td></tr>
<tr class="separator:a838359d25d318852c8204b999e5f375d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71ff2578d0655d983f2934a907b0f960"><td class="memTemplParams" colspan="2">template&lt;typename ReferenceType , typename std::enable_if&lt; std::is_reference&lt; ReferenceType &gt;::value &amp;&amp;std::is_const&lt; typename std::remove_reference&lt; ReferenceType &gt;::type &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a71ff2578d0655d983f2934a907b0f960"><td class="memTemplItemLeft" align="right" valign="top">ReferenceType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a71ff2578d0655d983f2934a907b0f960">get_ref</a> () const</td></tr>
<tr class="memdesc:a71ff2578d0655d983f2934a907b0f960"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a reference value (implicit) <a href="classnlohmann_1_1basic__json.html#a71ff2578d0655d983f2934a907b0f960">More...</a><br /></td></tr>
<tr class="separator:a71ff2578d0655d983f2934a907b0f960"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a67625415961aa7a1289d3d08cc404284"><td class="memTemplParams" colspan="2">template&lt;typename ValueType , typename std::enable_if&lt; !std::is_pointer&lt; ValueType &gt;::value &amp;&amp;!std::is_same&lt; ValueType, detail::json_ref&lt; basic_json &gt;&gt;::value &amp;&amp;!std::is_same&lt; ValueType, typename string_t::value_type &gt;::value &amp;&amp;!detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;!std::is_same&lt; ValueType, std::initializer_list&lt; typename string_t::value_type &gt;&gt;::value &amp;&amp;detail::is_detected&lt; detail::get_template_function, const basic_json_t &amp;, ValueType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a67625415961aa7a1289d3d08cc404284"><td class="memTemplItemLeft" align="right" valign="top">JSON_EXPLICIT&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a67625415961aa7a1289d3d08cc404284">operator ValueType</a> () const</td></tr>
<tr class="memdesc:a67625415961aa7a1289d3d08cc404284"><td class="mdescLeft">&#160;</td><td class="mdescRight">get a value (implicit) <a href="classnlohmann_1_1basic__json.html#a67625415961aa7a1289d3d08cc404284">More...</a><br /></td></tr>
<tr class="separator:a67625415961aa7a1289d3d08cc404284"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a76403180c973eb50c39948ed7b931d7d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a76403180c973eb50c39948ed7b931d7d">get_binary</a> ()</td></tr>
<tr class="separator:a76403180c973eb50c39948ed7b931d7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a016b2a512369a464f64e14b72885fd76"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a016b2a512369a464f64e14b72885fd76">get_binary</a> () const</td></tr>
<tr class="separator:a016b2a512369a464f64e14b72885fd76"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
element access</h2></td></tr>
<tr><td class="ititle" colspan="2"><p><a class="anchor" id="amgrpf68418821a90b03a001117a613b131dd"></a>Access to the JSON value. </p>
</td></tr>
<tr class="memitem:a5805a2f5a4f94bdff25423e7ba833ad2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">at</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> idx)</td></tr>
<tr class="memdesc:a5805a2f5a4f94bdff25423e7ba833ad2"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified array element with bounds checking <a href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">More...</a><br /></td></tr>
<tr class="separator:a5805a2f5a4f94bdff25423e7ba833ad2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2204de84d420ad31b29488641815f90e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a2204de84d420ad31b29488641815f90e">at</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> idx) const</td></tr>
<tr class="memdesc:a2204de84d420ad31b29488641815f90e"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified array element with bounds checking <a href="classnlohmann_1_1basic__json.html#a2204de84d420ad31b29488641815f90e">More...</a><br /></td></tr>
<tr class="separator:a2204de84d420ad31b29488641815f90e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a157868dfcf060bf67fa423bafbf27b57"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at</a> (const typename object_t::key_type &amp;key)</td></tr>
<tr class="memdesc:a157868dfcf060bf67fa423bafbf27b57"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element with bounds checking <a href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">More...</a><br /></td></tr>
<tr class="separator:a157868dfcf060bf67fa423bafbf27b57"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ca85574718e7fde0a3113775c3023c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5ca85574718e7fde0a3113775c3023c8">at</a> (const typename object_t::key_type &amp;key) const</td></tr>
<tr class="memdesc:a5ca85574718e7fde0a3113775c3023c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element with bounds checking <a href="classnlohmann_1_1basic__json.html#a5ca85574718e7fde0a3113775c3023c8">More...</a><br /></td></tr>
<tr class="separator:a5ca85574718e7fde0a3113775c3023c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05c86efa156004b090258c1469eab3fd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a05c86efa156004b090258c1469eab3fd">operator[]</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> idx)</td></tr>
<tr class="memdesc:a05c86efa156004b090258c1469eab3fd"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified array element <a href="classnlohmann_1_1basic__json.html#a05c86efa156004b090258c1469eab3fd">More...</a><br /></td></tr>
<tr class="separator:a05c86efa156004b090258c1469eab3fd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9fd9864614513a7191df0bada4880228"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a9fd9864614513a7191df0bada4880228">operator[]</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> idx) const</td></tr>
<tr class="memdesc:a9fd9864614513a7191df0bada4880228"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified array element <a href="classnlohmann_1_1basic__json.html#a9fd9864614513a7191df0bada4880228">More...</a><br /></td></tr>
<tr class="separator:a9fd9864614513a7191df0bada4880228"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad983106f7d7fd6a03cf609a9641976f4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[]</a> (const typename object_t::key_type &amp;key)</td></tr>
<tr class="memdesc:ad983106f7d7fd6a03cf609a9641976f4"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element <a href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">More...</a><br /></td></tr>
<tr class="separator:ad983106f7d7fd6a03cf609a9641976f4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7630fcfd1eda4d7de237af90466bffc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7630fcfd1eda4d7de237af90466bffc6">operator[]</a> (const typename object_t::key_type &amp;key) const</td></tr>
<tr class="memdesc:a7630fcfd1eda4d7de237af90466bffc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">read-only access specified object element <a href="classnlohmann_1_1basic__json.html#a7630fcfd1eda4d7de237af90466bffc6">More...</a><br /></td></tr>
<tr class="separator:a7630fcfd1eda4d7de237af90466bffc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ef3a5ec711a8e4b32407a261baee850"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:a4ef3a5ec711a8e4b32407a261baee850"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4ef3a5ec711a8e4b32407a261baee850">operator[]</a> (T *key)</td></tr>
<tr class="memdesc:a4ef3a5ec711a8e4b32407a261baee850"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element <a href="classnlohmann_1_1basic__json.html#a4ef3a5ec711a8e4b32407a261baee850">More...</a><br /></td></tr>
<tr class="separator:a4ef3a5ec711a8e4b32407a261baee850"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aadfe340990ea3f4039f8d3c100f254e6"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
<tr class="memitem:aadfe340990ea3f4039f8d3c100f254e6"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aadfe340990ea3f4039f8d3c100f254e6">operator[]</a> (T *key) const</td></tr>
<tr class="memdesc:aadfe340990ea3f4039f8d3c100f254e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">read-only access specified object element <a href="classnlohmann_1_1basic__json.html#aadfe340990ea3f4039f8d3c100f254e6">More...</a><br /></td></tr>
<tr class="separator:aadfe340990ea3f4039f8d3c100f254e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab29a59d20767180d6d2fe4f5054dd245"><td class="memTemplParams" colspan="2">template&lt;class ValueType , typename std::enable_if&lt; detail::is_getable&lt; basic_json_t, ValueType &gt;::value &amp;&amp;!std::is_same&lt; value_t, ValueType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:ab29a59d20767180d6d2fe4f5054dd245"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> (const typename object_t::key_type &amp;key, const ValueType &amp;default_value) const</td></tr>
<tr class="memdesc:ab29a59d20767180d6d2fe4f5054dd245"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element with default value <a href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">More...</a><br /></td></tr>
<tr class="separator:ab29a59d20767180d6d2fe4f5054dd245"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a378b9282dd1f7eb9bfffea6d177bbe"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7a378b9282dd1f7eb9bfffea6d177bbe">value</a> (const typename object_t::key_type &amp;key, const char *default_value) const</td></tr>
<tr class="memdesc:a7a378b9282dd1f7eb9bfffea6d177bbe"><td class="mdescLeft">&#160;</td><td class="mdescRight">overload for a default value of type const char* <a href="classnlohmann_1_1basic__json.html#a7a378b9282dd1f7eb9bfffea6d177bbe">More...</a><br /></td></tr>
<tr class="separator:a7a378b9282dd1f7eb9bfffea6d177bbe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a23d4ac15d8df59f36967a46a49dd896d"><td class="memTemplParams" colspan="2">template&lt;class ValueType , typename std::enable_if&lt; detail::is_getable&lt; basic_json_t, ValueType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a23d4ac15d8df59f36967a46a49dd896d"><td class="memTemplItemLeft" align="right" valign="top">ValueType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a23d4ac15d8df59f36967a46a49dd896d">value</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr, const ValueType &amp;default_value) const</td></tr>
<tr class="memdesc:a23d4ac15d8df59f36967a46a49dd896d"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified object element via JSON Pointer with default value <a href="classnlohmann_1_1basic__json.html#a23d4ac15d8df59f36967a46a49dd896d">More...</a><br /></td></tr>
<tr class="separator:a23d4ac15d8df59f36967a46a49dd896d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5dfdaa906f429f5f8b6e14db46e94852"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5dfdaa906f429f5f8b6e14db46e94852">value</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr, const char *default_value) const</td></tr>
<tr class="memdesc:a5dfdaa906f429f5f8b6e14db46e94852"><td class="mdescLeft">&#160;</td><td class="mdescRight">overload for a default value of type const char* <a href="classnlohmann_1_1basic__json.html#a5dfdaa906f429f5f8b6e14db46e94852">More...</a><br /></td></tr>
<tr class="separator:a5dfdaa906f429f5f8b6e14db46e94852"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad1702349b3aeca0e518921336faa570c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c">front</a> ()</td></tr>
<tr class="memdesc:ad1702349b3aeca0e518921336faa570c"><td class="mdescLeft">&#160;</td><td class="mdescRight">access the first element <a href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c">More...</a><br /></td></tr>
<tr class="separator:ad1702349b3aeca0e518921336faa570c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a135d1239f3189866baaede36ec0701c8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a135d1239f3189866baaede36ec0701c8">front</a> () const</td></tr>
<tr class="memdesc:a135d1239f3189866baaede36ec0701c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">access the first element <a href="classnlohmann_1_1basic__json.html#a135d1239f3189866baaede36ec0701c8">More...</a><br /></td></tr>
<tr class="separator:a135d1239f3189866baaede36ec0701c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab87589ef6b14a6e6881109e04d414830"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830">back</a> ()</td></tr>
<tr class="memdesc:ab87589ef6b14a6e6881109e04d414830"><td class="mdescLeft">&#160;</td><td class="mdescRight">access the last element <a href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830">More...</a><br /></td></tr>
<tr class="separator:ab87589ef6b14a6e6881109e04d414830"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b1077520ab6c8682a9039fcc2a50b5d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3b1077520ab6c8682a9039fcc2a50b5d">back</a> () const</td></tr>
<tr class="memdesc:a3b1077520ab6c8682a9039fcc2a50b5d"><td class="mdescLeft">&#160;</td><td class="mdescRight">access the last element <a href="classnlohmann_1_1basic__json.html#a3b1077520ab6c8682a9039fcc2a50b5d">More...</a><br /></td></tr>
<tr class="separator:a3b1077520ab6c8682a9039fcc2a50b5d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d0f5fb6f22126f7e3803dd7cdf7030f"><td class="memTemplParams" colspan="2">template&lt;class IteratorType , typename std::enable_if&lt; std::is_same&lt; IteratorType, typename basic_json_t::iterator &gt;::value||std::is_same&lt; IteratorType, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a0d0f5fb6f22126f7e3803dd7cdf7030f"><td class="memTemplItemLeft" align="right" valign="top">IteratorType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">erase</a> (IteratorType pos)</td></tr>
<tr class="memdesc:a0d0f5fb6f22126f7e3803dd7cdf7030f"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove element given an iterator <a href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">More...</a><br /></td></tr>
<tr class="separator:a0d0f5fb6f22126f7e3803dd7cdf7030f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24c397c38ce6984594a87c64b2378dc9"><td class="memTemplParams" colspan="2">template&lt;class IteratorType , typename std::enable_if&lt; std::is_same&lt; IteratorType, typename basic_json_t::iterator &gt;::value||std::is_same&lt; IteratorType, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a24c397c38ce6984594a87c64b2378dc9"><td class="memTemplItemLeft" align="right" valign="top">IteratorType&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">erase</a> (IteratorType first, IteratorType last)</td></tr>
<tr class="memdesc:a24c397c38ce6984594a87c64b2378dc9"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove elements given an iterator range <a href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">More...</a><br /></td></tr>
<tr class="separator:a24c397c38ce6984594a87c64b2378dc9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a022404d92eb877a7ad5bfce198ef067a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a022404d92eb877a7ad5bfce198ef067a">erase</a> (const typename object_t::key_type &amp;key)</td></tr>
<tr class="memdesc:a022404d92eb877a7ad5bfce198ef067a"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove element from a JSON object given a key <a href="classnlohmann_1_1basic__json.html#a022404d92eb877a7ad5bfce198ef067a">More...</a><br /></td></tr>
<tr class="separator:a022404d92eb877a7ad5bfce198ef067a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a49a7ac46583c77094f96a7717597ff5f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a49a7ac46583c77094f96a7717597ff5f">erase</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> idx)</td></tr>
<tr class="memdesc:a49a7ac46583c77094f96a7717597ff5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">remove element from a JSON array given an index <a href="classnlohmann_1_1basic__json.html#a49a7ac46583c77094f96a7717597ff5f">More...</a><br /></td></tr>
<tr class="separator:a49a7ac46583c77094f96a7717597ff5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
lookup</h2></td></tr>
<tr class="memitem:af4167275baa0b2da76cdc89b1117c300"><td class="memTemplParams" colspan="2">template&lt;typename KeyT &gt; </td></tr>
<tr class="memitem:af4167275baa0b2da76cdc89b1117c300"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af4167275baa0b2da76cdc89b1117c300">find</a> (KeyT &amp;&amp;key)</td></tr>
<tr class="memdesc:af4167275baa0b2da76cdc89b1117c300"><td class="mdescLeft">&#160;</td><td class="mdescRight">find an element in a JSON object <a href="classnlohmann_1_1basic__json.html#af4167275baa0b2da76cdc89b1117c300">More...</a><br /></td></tr>
<tr class="separator:af4167275baa0b2da76cdc89b1117c300"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a581684a08bf3fa341f9fcec34d3885a3"><td class="memTemplParams" colspan="2">template&lt;typename KeyT &gt; </td></tr>
<tr class="memitem:a581684a08bf3fa341f9fcec34d3885a3"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a581684a08bf3fa341f9fcec34d3885a3">find</a> (KeyT &amp;&amp;key) const</td></tr>
<tr class="memdesc:a581684a08bf3fa341f9fcec34d3885a3"><td class="mdescLeft">&#160;</td><td class="mdescRight">find an element in a JSON object <a href="classnlohmann_1_1basic__json.html#a581684a08bf3fa341f9fcec34d3885a3">More...</a><br /></td></tr>
<tr class="separator:a581684a08bf3fa341f9fcec34d3885a3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a369cf24de07945494df32e8b61e47917"><td class="memTemplParams" colspan="2">template&lt;typename KeyT &gt; </td></tr>
<tr class="memitem:a369cf24de07945494df32e8b61e47917"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a369cf24de07945494df32e8b61e47917">count</a> (KeyT &amp;&amp;key) const</td></tr>
<tr class="memdesc:a369cf24de07945494df32e8b61e47917"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the number of occurrences of a key in a JSON object <a href="classnlohmann_1_1basic__json.html#a369cf24de07945494df32e8b61e47917">More...</a><br /></td></tr>
<tr class="separator:a369cf24de07945494df32e8b61e47917"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a29333078b6e6cb76f2b5d12590bbf766"><td class="memTemplParams" colspan="2">template&lt;typename KeyT , typename std::enable_if&lt; !std::is_same&lt; typename std::decay&lt; KeyT &gt;::type, json_pointer &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a29333078b6e6cb76f2b5d12590bbf766"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766">contains</a> (KeyT &amp;&amp;key) const</td></tr>
<tr class="memdesc:a29333078b6e6cb76f2b5d12590bbf766"><td class="mdescLeft">&#160;</td><td class="mdescRight">check the existence of an element in a JSON object <a href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766">More...</a><br /></td></tr>
<tr class="separator:a29333078b6e6cb76f2b5d12590bbf766"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af700bb8239390cf462126f0c96606fae"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#af700bb8239390cf462126f0c96606fae">contains</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr) const</td></tr>
<tr class="memdesc:af700bb8239390cf462126f0c96606fae"><td class="mdescLeft">&#160;</td><td class="mdescRight">check the existence of an element in a JSON object given a JSON pointer <a href="classnlohmann_1_1basic__json.html#af700bb8239390cf462126f0c96606fae">More...</a><br /></td></tr>
<tr class="separator:af700bb8239390cf462126f0c96606fae"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
iterators</h2></td></tr>
<tr class="memitem:a0a8051760196ac813fd5eb3c8d5a2976"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0a8051760196ac813fd5eb3c8d5a2976">iterator_wrapper</a> (<a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> ref) noexcept</td></tr>
<tr class="memdesc:a0a8051760196ac813fd5eb3c8d5a2976"><td class="mdescLeft">&#160;</td><td class="mdescRight">wrapper to access iterator member functions in range-based for <a href="classnlohmann_1_1basic__json.html#a0a8051760196ac813fd5eb3c8d5a2976">More...</a><br /></td></tr>
<tr class="separator:a0a8051760196ac813fd5eb3c8d5a2976"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca63364d2dbbda5b8848cf6987ab13b4"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aca63364d2dbbda5b8848cf6987ab13b4">iterator_wrapper</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> ref) noexcept</td></tr>
<tr class="memdesc:aca63364d2dbbda5b8848cf6987ab13b4"><td class="mdescLeft">&#160;</td><td class="mdescRight">wrapper to access iterator member functions in range-based for <a href="classnlohmann_1_1basic__json.html#aca63364d2dbbda5b8848cf6987ab13b4">More...</a><br /></td></tr>
<tr class="separator:aca63364d2dbbda5b8848cf6987ab13b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7eae0427fb22e147d9c2ed1d532ed2aa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin</a> () noexcept</td></tr>
<tr class="memdesc:a7eae0427fb22e147d9c2ed1d532ed2aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns an iterator to the first element <a href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">More...</a><br /></td></tr>
<tr class="separator:a7eae0427fb22e147d9c2ed1d532ed2aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb76c192095f808283822c8401d2a3a1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aeb76c192095f808283822c8401d2a3a1">begin</a> () const noexcept</td></tr>
<tr class="memdesc:aeb76c192095f808283822c8401d2a3a1"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const iterator to the first element <a href="classnlohmann_1_1basic__json.html#aeb76c192095f808283822c8401d2a3a1">More...</a><br /></td></tr>
<tr class="separator:aeb76c192095f808283822c8401d2a3a1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae1e7bbc736b7e9d1155f9ee6c95b2090"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">cbegin</a> () const noexcept</td></tr>
<tr class="memdesc:ae1e7bbc736b7e9d1155f9ee6c95b2090"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const iterator to the first element <a href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">More...</a><br /></td></tr>
<tr class="separator:ae1e7bbc736b7e9d1155f9ee6c95b2090"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4db895fabb72f717b2c641a5c338d5a8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end</a> () noexcept</td></tr>
<tr class="memdesc:a4db895fabb72f717b2c641a5c338d5a8"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns an iterator to one past the last element <a href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">More...</a><br /></td></tr>
<tr class="separator:a4db895fabb72f717b2c641a5c338d5a8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94522e3b348ef50d9c212121b3478ee1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a94522e3b348ef50d9c212121b3478ee1">end</a> () const noexcept</td></tr>
<tr class="memdesc:a94522e3b348ef50d9c212121b3478ee1"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const iterator to one past the last element <a href="classnlohmann_1_1basic__json.html#a94522e3b348ef50d9c212121b3478ee1">More...</a><br /></td></tr>
<tr class="separator:a94522e3b348ef50d9c212121b3478ee1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab2588e4f8767b792656e5ebcf922a9f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">cend</a> () const noexcept</td></tr>
<tr class="memdesc:aab2588e4f8767b792656e5ebcf922a9f"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const iterator to one past the last element <a href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">More...</a><br /></td></tr>
<tr class="separator:aab2588e4f8767b792656e5ebcf922a9f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a32674498f617591fff4002ad0934a4f6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a0d2df32b8689b776dd3b0865f1362f40">reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin</a> () noexcept</td></tr>
<tr class="memdesc:a32674498f617591fff4002ad0934a4f6"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns an iterator to the reverse-beginning <a href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">More...</a><br /></td></tr>
<tr class="separator:a32674498f617591fff4002ad0934a4f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8d792070799098e6172e82a3865875ee"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a8d792070799098e6172e82a3865875ee">rbegin</a> () const noexcept</td></tr>
<tr class="memdesc:a8d792070799098e6172e82a3865875ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const reverse iterator to the last element <a href="classnlohmann_1_1basic__json.html#a8d792070799098e6172e82a3865875ee">More...</a><br /></td></tr>
<tr class="separator:a8d792070799098e6172e82a3865875ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a27d668c5b974f4b3bded760f5553b5c6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a0d2df32b8689b776dd3b0865f1362f40">reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend</a> () noexcept</td></tr>
<tr class="memdesc:a27d668c5b974f4b3bded760f5553b5c6"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns an iterator to the reverse-end <a href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">More...</a><br /></td></tr>
<tr class="separator:a27d668c5b974f4b3bded760f5553b5c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6adf45af5f550ae31fe3bf0759b9af14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a6adf45af5f550ae31fe3bf0759b9af14">rend</a> () const noexcept</td></tr>
<tr class="memdesc:a6adf45af5f550ae31fe3bf0759b9af14"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const reverse iterator to one before the first <a href="classnlohmann_1_1basic__json.html#a6adf45af5f550ae31fe3bf0759b9af14">More...</a><br /></td></tr>
<tr class="separator:a6adf45af5f550ae31fe3bf0759b9af14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe4ea2bbb97eba3baad6c4286366e7c5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">crbegin</a> () const noexcept</td></tr>
<tr class="memdesc:abe4ea2bbb97eba3baad6c4286366e7c5"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const reverse iterator to the last element <a href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">More...</a><br /></td></tr>
<tr class="separator:abe4ea2bbb97eba3baad6c4286366e7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae54982c31d6c21e140980ce502425cf6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">crend</a> () const noexcept</td></tr>
<tr class="memdesc:ae54982c31d6c21e140980ce502425cf6"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns a const reverse iterator to one before the first <a href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">More...</a><br /></td></tr>
<tr class="separator:ae54982c31d6c21e140980ce502425cf6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5961446010dfc494e0c247b4e9026977"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977">items</a> () noexcept</td></tr>
<tr class="memdesc:a5961446010dfc494e0c247b4e9026977"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper to access iterator member functions in range-based for <a href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977">More...</a><br /></td></tr>
<tr class="separator:a5961446010dfc494e0c247b4e9026977"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a79bac81ac682a6327fbd4e792190dfc6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt; <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a79bac81ac682a6327fbd4e792190dfc6">items</a> () const noexcept</td></tr>
<tr class="memdesc:a79bac81ac682a6327fbd4e792190dfc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">helper to access iterator member functions in range-based for <a href="classnlohmann_1_1basic__json.html#a79bac81ac682a6327fbd4e792190dfc6">More...</a><br /></td></tr>
<tr class="separator:a79bac81ac682a6327fbd4e792190dfc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
capacity</h2></td></tr>
<tr class="memitem:a54599e2a109faaebfb50df824567e5ae"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae">empty</a> () const noexcept</td></tr>
<tr class="memdesc:a54599e2a109faaebfb50df824567e5ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">checks whether the container is empty. <a href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae">More...</a><br /></td></tr>
<tr class="separator:a54599e2a109faaebfb50df824567e5ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaa2519eb5a174547b8a2f6019def9b65"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65">size</a> () const noexcept</td></tr>
<tr class="memdesc:aaa2519eb5a174547b8a2f6019def9b65"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the number of elements <a href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65">More...</a><br /></td></tr>
<tr class="separator:aaa2519eb5a174547b8a2f6019def9b65"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a502e4020141ed42d55e5d1fd88b3e80f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f">max_size</a> () const noexcept</td></tr>
<tr class="memdesc:a502e4020141ed42d55e5d1fd88b3e80f"><td class="mdescLeft">&#160;</td><td class="mdescRight">returns the maximum possible number of elements <a href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f">More...</a><br /></td></tr>
<tr class="separator:a502e4020141ed42d55e5d1fd88b3e80f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
modifiers</h2></td></tr>
<tr class="memitem:aee0ae36cbfb0336832ebc0374c3c7679"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aee0ae36cbfb0336832ebc0374c3c7679">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> left, <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> right) noexcept(std::is_nothrow_move_constructible&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_constructible&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a>)</td></tr>
<tr class="memdesc:aee0ae36cbfb0336832ebc0374c3c7679"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#aee0ae36cbfb0336832ebc0374c3c7679">More...</a><br /></td></tr>
<tr class="separator:aee0ae36cbfb0336832ebc0374c3c7679"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a680c6cbaca83984fd7a5dd7496f86594"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a680c6cbaca83984fd7a5dd7496f86594">clear</a> () noexcept</td></tr>
<tr class="memdesc:a680c6cbaca83984fd7a5dd7496f86594"><td class="mdescLeft">&#160;</td><td class="mdescRight">clears the contents <a href="classnlohmann_1_1basic__json.html#a680c6cbaca83984fd7a5dd7496f86594">More...</a><br /></td></tr>
<tr class="separator:a680c6cbaca83984fd7a5dd7496f86594"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a887cd40d16a12596c24cd42c66107ac6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6">push_back</a> (<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;val)</td></tr>
<tr class="memdesc:a887cd40d16a12596c24cd42c66107ac6"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an array <a href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6">More...</a><br /></td></tr>
<tr class="separator:a887cd40d16a12596c24cd42c66107ac6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe3c79845dc1dd2243724558859d7e4b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#afe3c79845dc1dd2243724558859d7e4b">operator+=</a> (<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;val)</td></tr>
<tr class="memdesc:afe3c79845dc1dd2243724558859d7e4b"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an array <a href="classnlohmann_1_1basic__json.html#afe3c79845dc1dd2243724558859d7e4b">More...</a><br /></td></tr>
<tr class="separator:afe3c79845dc1dd2243724558859d7e4b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abf9a7dcd2b7a3080ccfacf5d0ebf12e5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abf9a7dcd2b7a3080ccfacf5d0ebf12e5">push_back</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;val)</td></tr>
<tr class="memdesc:abf9a7dcd2b7a3080ccfacf5d0ebf12e5"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an array <a href="classnlohmann_1_1basic__json.html#abf9a7dcd2b7a3080ccfacf5d0ebf12e5">More...</a><br /></td></tr>
<tr class="separator:abf9a7dcd2b7a3080ccfacf5d0ebf12e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ec964f3346fa981453933901ca39dd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4ec964f3346fa981453933901ca39dd1">operator+=</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;val)</td></tr>
<tr class="memdesc:a4ec964f3346fa981453933901ca39dd1"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an array <a href="classnlohmann_1_1basic__json.html#a4ec964f3346fa981453933901ca39dd1">More...</a><br /></td></tr>
<tr class="separator:a4ec964f3346fa981453933901ca39dd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affac3bab5efcb26cdcd0942d24ad0ab5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#affac3bab5efcb26cdcd0942d24ad0ab5">push_back</a> (const typename object_t::value_type &amp;val)</td></tr>
<tr class="memdesc:affac3bab5efcb26cdcd0942d24ad0ab5"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an object <a href="classnlohmann_1_1basic__json.html#affac3bab5efcb26cdcd0942d24ad0ab5">More...</a><br /></td></tr>
<tr class="separator:affac3bab5efcb26cdcd0942d24ad0ab5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acbfa964cfa7c74f92d48a65eae744cfd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#acbfa964cfa7c74f92d48a65eae744cfd">operator+=</a> (const typename object_t::value_type &amp;val)</td></tr>
<tr class="memdesc:acbfa964cfa7c74f92d48a65eae744cfd"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an object <a href="classnlohmann_1_1basic__json.html#acbfa964cfa7c74f92d48a65eae744cfd">More...</a><br /></td></tr>
<tr class="separator:acbfa964cfa7c74f92d48a65eae744cfd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4f811ef36976a82a8e29cb1ae7c40152"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a4f811ef36976a82a8e29cb1ae7c40152">push_back</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> init)</td></tr>
<tr class="memdesc:a4f811ef36976a82a8e29cb1ae7c40152"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an object <a href="classnlohmann_1_1basic__json.html#a4f811ef36976a82a8e29cb1ae7c40152">More...</a><br /></td></tr>
<tr class="separator:a4f811ef36976a82a8e29cb1ae7c40152"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7ca83d8fdd49dae585f9980af5f7a8c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad7ca83d8fdd49dae585f9980af5f7a8c">operator+=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> init)</td></tr>
<tr class="memdesc:ad7ca83d8fdd49dae585f9980af5f7a8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an object <a href="classnlohmann_1_1basic__json.html#ad7ca83d8fdd49dae585f9980af5f7a8c">More...</a><br /></td></tr>
<tr class="separator:ad7ca83d8fdd49dae585f9980af5f7a8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58837bac1c40038dcb07f437a02735da"><td class="memTemplParams" colspan="2">template&lt;class... Args&gt; </td></tr>
<tr class="memitem:a58837bac1c40038dcb07f437a02735da"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a58837bac1c40038dcb07f437a02735da">emplace_back</a> (Args &amp;&amp;... args)</td></tr>
<tr class="memdesc:a58837bac1c40038dcb07f437a02735da"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an array <a href="classnlohmann_1_1basic__json.html#a58837bac1c40038dcb07f437a02735da">More...</a><br /></td></tr>
<tr class="separator:a58837bac1c40038dcb07f437a02735da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae3866ccade11e7b73902169714363f21"><td class="memTemplParams" colspan="2">template&lt;class... Args&gt; </td></tr>
<tr class="memitem:ae3866ccade11e7b73902169714363f21"><td class="memTemplItemLeft" align="right" valign="top">std::pair&lt; <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>, bool &gt;&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae3866ccade11e7b73902169714363f21">emplace</a> (Args &amp;&amp;... args)</td></tr>
<tr class="memdesc:ae3866ccade11e7b73902169714363f21"><td class="mdescLeft">&#160;</td><td class="mdescRight">add an object to an object if key does not exist <a href="classnlohmann_1_1basic__json.html#ae3866ccade11e7b73902169714363f21">More...</a><br /></td></tr>
<tr class="separator:ae3866ccade11e7b73902169714363f21"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab80c4bdc11b40246f668008bae80df25"><td class="memTemplParams" colspan="2">template&lt;typename... Args&gt; </td></tr>
<tr class="memitem:ab80c4bdc11b40246f668008bae80df25"><td class="memTemplItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab80c4bdc11b40246f668008bae80df25">insert_iterator</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, Args &amp;&amp;... args)</td></tr>
<tr class="separator:ab80c4bdc11b40246f668008bae80df25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac6be8bd68e9dffd793846e0f0b239d62"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;val)</td></tr>
<tr class="memdesc:ac6be8bd68e9dffd793846e0f0b239d62"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts element <a href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62">More...</a><br /></td></tr>
<tr class="separator:ac6be8bd68e9dffd793846e0f0b239d62"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3b86713def43fb79d40cb344b826033c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a3b86713def43fb79d40cb344b826033c">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;val)</td></tr>
<tr class="memdesc:a3b86713def43fb79d40cb344b826033c"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts element <a href="classnlohmann_1_1basic__json.html#a3b86713def43fb79d40cb344b826033c">More...</a><br /></td></tr>
<tr class="separator:a3b86713def43fb79d40cb344b826033c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58e65af3dd9223d8593c6ca1a8477c3f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a58e65af3dd9223d8593c6ca1a8477c3f">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, <a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> cnt, const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;val)</td></tr>
<tr class="memdesc:a58e65af3dd9223d8593c6ca1a8477c3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts elements <a href="classnlohmann_1_1basic__json.html#a58e65af3dd9223d8593c6ca1a8477c3f">More...</a><br /></td></tr>
<tr class="separator:a58e65af3dd9223d8593c6ca1a8477c3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a939390bb7d48b11c64413ec79c7104fa"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a939390bb7d48b11c64413ec79c7104fa">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> first, <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> last)</td></tr>
<tr class="memdesc:a939390bb7d48b11c64413ec79c7104fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts elements <a href="classnlohmann_1_1basic__json.html#a939390bb7d48b11c64413ec79c7104fa">More...</a><br /></td></tr>
<tr class="separator:a939390bb7d48b11c64413ec79c7104fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adaae3e55f4349e53d1526a6da464d34f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#adaae3e55f4349e53d1526a6da464d34f">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> pos, <a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a> ilist)</td></tr>
<tr class="memdesc:adaae3e55f4349e53d1526a6da464d34f"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts elements <a href="classnlohmann_1_1basic__json.html#adaae3e55f4349e53d1526a6da464d34f">More...</a><br /></td></tr>
<tr class="separator:adaae3e55f4349e53d1526a6da464d34f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab2bc544912cb3954b38ee76772c16d7"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aab2bc544912cb3954b38ee76772c16d7">insert</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> first, <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> last)</td></tr>
<tr class="memdesc:aab2bc544912cb3954b38ee76772c16d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">inserts elements <a href="classnlohmann_1_1basic__json.html#aab2bc544912cb3954b38ee76772c16d7">More...</a><br /></td></tr>
<tr class="separator:aab2bc544912cb3954b38ee76772c16d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c02637be3d8bd730a14082cc05f7a85"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85">update</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> j)</td></tr>
<tr class="memdesc:a6c02637be3d8bd730a14082cc05f7a85"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates a JSON object from another object, overwriting existing keys <a href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85">More...</a><br /></td></tr>
<tr class="separator:a6c02637be3d8bd730a14082cc05f7a85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0dbd5c8bdff3d633ff6d1d373297b777"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0dbd5c8bdff3d633ff6d1d373297b777">update</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> first, <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> last)</td></tr>
<tr class="memdesc:a0dbd5c8bdff3d633ff6d1d373297b777"><td class="mdescLeft">&#160;</td><td class="mdescRight">updates a JSON object from another object, overwriting existing keys <a href="classnlohmann_1_1basic__json.html#a0dbd5c8bdff3d633ff6d1d373297b777">More...</a><br /></td></tr>
<tr class="separator:a0dbd5c8bdff3d633ff6d1d373297b777"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade6945272c7b703520f435ad580d3c7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> other) noexcept(std::is_nothrow_move_constructible&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_constructible&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a> &amp;&amp;std::is_nothrow_move_assignable&lt; <a class="el" href="unionnlohmann_1_1basic__json_1_1json__value.html">json_value</a> &gt;::<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value</a>)</td></tr>
<tr class="memdesc:ade6945272c7b703520f435ad580d3c7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f">More...</a><br /></td></tr>
<tr class="separator:ade6945272c7b703520f435ad580d3c7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adbb8131d4eaea460e8329bc0dfff1f6e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#adbb8131d4eaea460e8329bc0dfff1f6e">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> &amp;other)</td></tr>
<tr class="memdesc:adbb8131d4eaea460e8329bc0dfff1f6e"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#adbb8131d4eaea460e8329bc0dfff1f6e">More...</a><br /></td></tr>
<tr class="separator:adbb8131d4eaea460e8329bc0dfff1f6e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02f73d65a38b3f0450c992e8c337d522"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a02f73d65a38b3f0450c992e8c337d522">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> &amp;other)</td></tr>
<tr class="memdesc:a02f73d65a38b3f0450c992e8c337d522"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#a02f73d65a38b3f0450c992e8c337d522">More...</a><br /></td></tr>
<tr class="separator:a02f73d65a38b3f0450c992e8c337d522"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1c597d3cfa8aeec2ab4492306201851e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a1c597d3cfa8aeec2ab4492306201851e">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> &amp;other)</td></tr>
<tr class="memdesc:a1c597d3cfa8aeec2ab4492306201851e"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#a1c597d3cfa8aeec2ab4492306201851e">More...</a><br /></td></tr>
<tr class="separator:a1c597d3cfa8aeec2ab4492306201851e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe5adbae0da85a23ad7e812bdb85672f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abe5adbae0da85a23ad7e812bdb85672f">swap</a> (<a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> &amp;other)</td></tr>
<tr class="memdesc:abe5adbae0da85a23ad7e812bdb85672f"><td class="mdescLeft">&#160;</td><td class="mdescRight">exchanges the values <a href="classnlohmann_1_1basic__json.html#abe5adbae0da85a23ad7e812bdb85672f">More...</a><br /></td></tr>
<tr class="separator:abe5adbae0da85a23ad7e812bdb85672f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02f1c7f2f2684292590294dccbbd7621"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a02f1c7f2f2684292590294dccbbd7621">swap</a> (typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;other)</td></tr>
<tr class="separator:a02f1c7f2f2684292590294dccbbd7621"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
lexicographical comparison operators</h2></td></tr>
<tr class="memitem:a122640e7e2db1814fc7bbb3c122ec76e"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a122640e7e2db1814fc7bbb3c122ec76e">operator==</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a122640e7e2db1814fc7bbb3c122ec76e"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: equal <a href="classnlohmann_1_1basic__json.html#a122640e7e2db1814fc7bbb3c122ec76e">More...</a><br /></td></tr>
<tr class="separator:a122640e7e2db1814fc7bbb3c122ec76e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba21440ea1aff44f718285ed7d6d20d9"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:aba21440ea1aff44f718285ed7d6d20d9"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aba21440ea1aff44f718285ed7d6d20d9">operator==</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:aba21440ea1aff44f718285ed7d6d20d9"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: equal <a href="classnlohmann_1_1basic__json.html#aba21440ea1aff44f718285ed7d6d20d9">More...</a><br /></td></tr>
<tr class="separator:aba21440ea1aff44f718285ed7d6d20d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aef302e3ae215e46e5035d0e4fdf47235"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:aef302e3ae215e46e5035d0e4fdf47235"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aef302e3ae215e46e5035d0e4fdf47235">operator==</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:aef302e3ae215e46e5035d0e4fdf47235"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: equal <a href="classnlohmann_1_1basic__json.html#aef302e3ae215e46e5035d0e4fdf47235">More...</a><br /></td></tr>
<tr class="separator:aef302e3ae215e46e5035d0e4fdf47235"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6e2e21da48f5d9471716cd868a068327"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a6e2e21da48f5d9471716cd868a068327">operator!=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a6e2e21da48f5d9471716cd868a068327"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: not equal <a href="classnlohmann_1_1basic__json.html#a6e2e21da48f5d9471716cd868a068327">More...</a><br /></td></tr>
<tr class="separator:a6e2e21da48f5d9471716cd868a068327"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afefc38fc08bdb7a9a7474b5ab4a1140f"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:afefc38fc08bdb7a9a7474b5ab4a1140f"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#afefc38fc08bdb7a9a7474b5ab4a1140f">operator!=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:afefc38fc08bdb7a9a7474b5ab4a1140f"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: not equal <a href="classnlohmann_1_1basic__json.html#afefc38fc08bdb7a9a7474b5ab4a1140f">More...</a><br /></td></tr>
<tr class="separator:afefc38fc08bdb7a9a7474b5ab4a1140f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0e886db6e9fa91ff9fd853333fed05b"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:ab0e886db6e9fa91ff9fd853333fed05b"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab0e886db6e9fa91ff9fd853333fed05b">operator!=</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:ab0e886db6e9fa91ff9fd853333fed05b"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: not equal <a href="classnlohmann_1_1basic__json.html#ab0e886db6e9fa91ff9fd853333fed05b">More...</a><br /></td></tr>
<tr class="separator:ab0e886db6e9fa91ff9fd853333fed05b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aacd442b66140c764c594ac8ad7dfd5b3"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aacd442b66140c764c594ac8ad7dfd5b3">operator&lt;</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:aacd442b66140c764c594ac8ad7dfd5b3"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than <a href="classnlohmann_1_1basic__json.html#aacd442b66140c764c594ac8ad7dfd5b3">More...</a><br /></td></tr>
<tr class="separator:aacd442b66140c764c594ac8ad7dfd5b3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7999ee3a69a4979d92e98ab1e88c8759"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a7999ee3a69a4979d92e98ab1e88c8759"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7999ee3a69a4979d92e98ab1e88c8759">operator&lt;</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:a7999ee3a69a4979d92e98ab1e88c8759"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than <a href="classnlohmann_1_1basic__json.html#a7999ee3a69a4979d92e98ab1e88c8759">More...</a><br /></td></tr>
<tr class="separator:a7999ee3a69a4979d92e98ab1e88c8759"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abed3e9b4ab75f5bcbd3cd20f5af5cdab"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:abed3e9b4ab75f5bcbd3cd20f5af5cdab"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abed3e9b4ab75f5bcbd3cd20f5af5cdab">operator&lt;</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:abed3e9b4ab75f5bcbd3cd20f5af5cdab"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than <a href="classnlohmann_1_1basic__json.html#abed3e9b4ab75f5bcbd3cd20f5af5cdab">More...</a><br /></td></tr>
<tr class="separator:abed3e9b4ab75f5bcbd3cd20f5af5cdab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c8bb5200f5eac10d31e26be46e5b1ac"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5c8bb5200f5eac10d31e26be46e5b1ac">operator&lt;=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a5c8bb5200f5eac10d31e26be46e5b1ac"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than or equal <a href="classnlohmann_1_1basic__json.html#a5c8bb5200f5eac10d31e26be46e5b1ac">More...</a><br /></td></tr>
<tr class="separator:a5c8bb5200f5eac10d31e26be46e5b1ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7e368211047f725f333696aefdf39ffd"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a7e368211047f725f333696aefdf39ffd"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7e368211047f725f333696aefdf39ffd">operator&lt;=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:a7e368211047f725f333696aefdf39ffd"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than or equal <a href="classnlohmann_1_1basic__json.html#a7e368211047f725f333696aefdf39ffd">More...</a><br /></td></tr>
<tr class="separator:a7e368211047f725f333696aefdf39ffd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad73f88f70fe5acfa521750a8cd710026"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:ad73f88f70fe5acfa521750a8cd710026"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad73f88f70fe5acfa521750a8cd710026">operator&lt;=</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:ad73f88f70fe5acfa521750a8cd710026"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: less than or equal <a href="classnlohmann_1_1basic__json.html#ad73f88f70fe5acfa521750a8cd710026">More...</a><br /></td></tr>
<tr class="separator:ad73f88f70fe5acfa521750a8cd710026"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87db51b6b936fb2ea293cdbc8702dcb8"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a87db51b6b936fb2ea293cdbc8702dcb8">operator&gt;</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a87db51b6b936fb2ea293cdbc8702dcb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than <a href="classnlohmann_1_1basic__json.html#a87db51b6b936fb2ea293cdbc8702dcb8">More...</a><br /></td></tr>
<tr class="separator:a87db51b6b936fb2ea293cdbc8702dcb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a412895af9a582869a4d369a64fb1b6d6"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a412895af9a582869a4d369a64fb1b6d6"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a412895af9a582869a4d369a64fb1b6d6">operator&gt;</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:a412895af9a582869a4d369a64fb1b6d6"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than <a href="classnlohmann_1_1basic__json.html#a412895af9a582869a4d369a64fb1b6d6">More...</a><br /></td></tr>
<tr class="separator:a412895af9a582869a4d369a64fb1b6d6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a124c319566198d9f092c5bebea46ce77"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a124c319566198d9f092c5bebea46ce77"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a124c319566198d9f092c5bebea46ce77">operator&gt;</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a124c319566198d9f092c5bebea46ce77"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than <a href="classnlohmann_1_1basic__json.html#a124c319566198d9f092c5bebea46ce77">More...</a><br /></td></tr>
<tr class="separator:a124c319566198d9f092c5bebea46ce77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a74a943800c7f103d0990d7eef82c6453"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a74a943800c7f103d0990d7eef82c6453">operator&gt;=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a74a943800c7f103d0990d7eef82c6453"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than or equal <a href="classnlohmann_1_1basic__json.html#a74a943800c7f103d0990d7eef82c6453">More...</a><br /></td></tr>
<tr class="separator:a74a943800c7f103d0990d7eef82c6453"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a68e3a92b3d9be1faa05c92d096299189"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a68e3a92b3d9be1faa05c92d096299189"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a68e3a92b3d9be1faa05c92d096299189">operator&gt;=</a> (<a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, const ScalarType rhs) noexcept</td></tr>
<tr class="memdesc:a68e3a92b3d9be1faa05c92d096299189"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than or equal <a href="classnlohmann_1_1basic__json.html#a68e3a92b3d9be1faa05c92d096299189">More...</a><br /></td></tr>
<tr class="separator:a68e3a92b3d9be1faa05c92d096299189"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ee0e3e8afc7cbd932d6ed66418fa80a"><td class="memTemplParams" colspan="2">template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </td></tr>
<tr class="memitem:a5ee0e3e8afc7cbd932d6ed66418fa80a"><td class="memTemplItemLeft" align="right" valign="top">bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5ee0e3e8afc7cbd932d6ed66418fa80a">operator&gt;=</a> (const ScalarType lhs, <a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) noexcept</td></tr>
<tr class="memdesc:a5ee0e3e8afc7cbd932d6ed66418fa80a"><td class="mdescLeft">&#160;</td><td class="mdescRight">comparison: greater than or equal <a href="classnlohmann_1_1basic__json.html#a5ee0e3e8afc7cbd932d6ed66418fa80a">More...</a><br /></td></tr>
<tr class="separator:a5ee0e3e8afc7cbd932d6ed66418fa80a"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
serialization</h2></td></tr>
<tr class="memitem:a5e34c5435e557d0bf666bd7311211405"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5e34c5435e557d0bf666bd7311211405">operator&lt;&lt;</a> (std::ostream &amp;o, const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j)</td></tr>
<tr class="memdesc:a5e34c5435e557d0bf666bd7311211405"><td class="mdescLeft">&#160;</td><td class="mdescRight">serialize to stream <a href="classnlohmann_1_1basic__json.html#a5e34c5435e557d0bf666bd7311211405">More...</a><br /></td></tr>
<tr class="separator:a5e34c5435e557d0bf666bd7311211405"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a34d6a60dd99e9f33b8273a1c8db5669b"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a34d6a60dd99e9f33b8273a1c8db5669b">operator&gt;&gt;</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, std::ostream &amp;o)</td></tr>
<tr class="memdesc:a34d6a60dd99e9f33b8273a1c8db5669b"><td class="mdescLeft">&#160;</td><td class="mdescRight">serialize to stream <a href="classnlohmann_1_1basic__json.html#a34d6a60dd99e9f33b8273a1c8db5669b">More...</a><br /></td></tr>
<tr class="separator:a34d6a60dd99e9f33b8273a1c8db5669b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
deserialization</h2></td></tr>
<tr class="memitem:a60ca396028b8d9714c6e10efbf475af6"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a60ca396028b8d9714c6e10efbf475af6">operator&lt;&lt;</a> (<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, std::istream &amp;i)</td></tr>
<tr class="memdesc:a60ca396028b8d9714c6e10efbf475af6"><td class="mdescLeft">&#160;</td><td class="mdescRight">deserialize from stream <a href="classnlohmann_1_1basic__json.html#a60ca396028b8d9714c6e10efbf475af6">More...</a><br /></td></tr>
<tr class="separator:a60ca396028b8d9714c6e10efbf475af6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaf363408931d76472ded14017e59c9e8"><td class="memItemLeft" align="right" valign="top">std::istream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aaf363408931d76472ded14017e59c9e8">operator&gt;&gt;</a> (std::istream &amp;i, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j)</td></tr>
<tr class="memdesc:aaf363408931d76472ded14017e59c9e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">deserialize from stream <a href="classnlohmann_1_1basic__json.html#aaf363408931d76472ded14017e59c9e8">More...</a><br /></td></tr>
<tr class="separator:aaf363408931d76472ded14017e59c9e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a633db4570bf0afb137dec11a2439acee"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a633db4570bf0afb137dec11a2439acee"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee">parse</a> (InputType &amp;&amp;i, const <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)</td></tr>
<tr class="memdesc:a633db4570bf0afb137dec11a2439acee"><td class="mdescLeft">&#160;</td><td class="mdescRight">deserialize from a compatible input <a href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee">More...</a><br /></td></tr>
<tr class="separator:a633db4570bf0afb137dec11a2439acee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab7470dfe956c4e70ea54a22e5ca32eab"><td class="memTemplParams" colspan="2">template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:ab7470dfe956c4e70ea54a22e5ca32eab"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab7470dfe956c4e70ea54a22e5ca32eab">parse</a> (IteratorType first, IteratorType last, const <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)</td></tr>
<tr class="memdesc:ab7470dfe956c4e70ea54a22e5ca32eab"><td class="mdescLeft">&#160;</td><td class="mdescRight">deserialize from a pair of character iterators <a href="classnlohmann_1_1basic__json.html#ab7470dfe956c4e70ea54a22e5ca32eab">More...</a><br /></td></tr>
<tr class="separator:ab7470dfe956c4e70ea54a22e5ca32eab"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab57873e5fad72c456a396d50a272a197"><td class="memItemLeft" align="right" valign="top"><a id="ab57873e5fad72c456a396d50a272a197"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><b>parse</b> (detail::span_input_adapter &amp;&amp;i, const <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> cb=nullptr, const bool allow_exceptions=true, const bool ignore_comments=false)</td></tr>
<tr class="separator:ab57873e5fad72c456a396d50a272a197"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fb5ed7fb021ad10238cb57937f07d50"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a7fb5ed7fb021ad10238cb57937f07d50"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7fb5ed7fb021ad10238cb57937f07d50">accept</a> (InputType &amp;&amp;i, const bool ignore_comments=false)</td></tr>
<tr class="memdesc:a7fb5ed7fb021ad10238cb57937f07d50"><td class="mdescLeft">&#160;</td><td class="mdescRight">check if the input is valid JSON <a href="classnlohmann_1_1basic__json.html#a7fb5ed7fb021ad10238cb57937f07d50">More...</a><br /></td></tr>
<tr class="separator:a7fb5ed7fb021ad10238cb57937f07d50"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab88366b8b8da10a34667e85c2f75a43"><td class="memTemplParams" colspan="2"><a id="aab88366b8b8da10a34667e85c2f75a43"></a>
template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:aab88366b8b8da10a34667e85c2f75a43"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><b>accept</b> (IteratorType first, IteratorType last, const bool ignore_comments=false)</td></tr>
<tr class="separator:aab88366b8b8da10a34667e85c2f75a43"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a820ddb87c8e6bc2f1aa58c0cec6a46f9"><td class="memItemLeft" align="right" valign="top"><a id="a820ddb87c8e6bc2f1aa58c0cec6a46f9"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT bool&#160;</td><td class="memItemRight" valign="bottom"><b>accept</b> (detail::span_input_adapter &amp;&amp;i, const bool ignore_comments=false)</td></tr>
<tr class="separator:a820ddb87c8e6bc2f1aa58c0cec6a46f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a21dc71dda1df5d840625c360329e69fe"><td class="memTemplParams" colspan="2">template&lt;typename InputType , typename SAX &gt; </td></tr>
<tr class="memitem:a21dc71dda1df5d840625c360329e69fe"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a21dc71dda1df5d840625c360329e69fe">sax_parse</a> (InputType &amp;&amp;i, SAX *sax, <a class="el" href="namespacenlohmann_1_1detail.html#aa554fc6a11519e4f347deb25a9f0db40">input_format_t</a> format=input_format_t::json, const bool strict=true, const bool ignore_comments=false)</td></tr>
<tr class="memdesc:a21dc71dda1df5d840625c360329e69fe"><td class="mdescLeft">&#160;</td><td class="mdescRight">generate SAX events <a href="classnlohmann_1_1basic__json.html#a21dc71dda1df5d840625c360329e69fe">More...</a><br /></td></tr>
<tr class="separator:a21dc71dda1df5d840625c360329e69fe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af23e5f8e930bf915c01f3c8102697df8"><td class="memTemplParams" colspan="2"><a id="af23e5f8e930bf915c01f3c8102697df8"></a>
template&lt;class IteratorType , class SAX &gt; </td></tr>
<tr class="memitem:af23e5f8e930bf915c01f3c8102697df8"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sax_parse</b> (IteratorType first, IteratorType last, SAX *sax, <a class="el" href="namespacenlohmann_1_1detail.html#aa554fc6a11519e4f347deb25a9f0db40">input_format_t</a> format=input_format_t::json, const bool strict=true, const bool ignore_comments=false)</td></tr>
<tr class="separator:af23e5f8e930bf915c01f3c8102697df8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3eb7c400c9e6d2739f332ea77e64bdb8"><td class="memTemplParams" colspan="2"><a id="a3eb7c400c9e6d2739f332ea77e64bdb8"></a>
template&lt;typename SAX &gt; </td></tr>
<tr class="memitem:a3eb7c400c9e6d2739f332ea77e64bdb8"><td class="memTemplItemLeft" align="right" valign="top">static bool&#160;</td><td class="memTemplItemRight" valign="bottom"><b>sax_parse</b> (detail::span_input_adapter &amp;&amp;i, SAX *sax, <a class="el" href="namespacenlohmann_1_1detail.html#aa554fc6a11519e4f347deb25a9f0db40">input_format_t</a> format=input_format_t::json, const bool strict=true, const bool ignore_comments=false)</td></tr>
<tr class="separator:a3eb7c400c9e6d2739f332ea77e64bdb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
binary serialization/deserialization support</h2></td></tr>
<tr class="memitem:aa0345b54ea150f6f803444766832979a"><td class="memItemLeft" align="right" valign="top">static std::vector&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j)</td></tr>
<tr class="memdesc:aa0345b54ea150f6f803444766832979a"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a CBOR serialization of a given JSON value <a href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">More...</a><br /></td></tr>
<tr class="separator:aa0345b54ea150f6f803444766832979a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af803f43acdb465ead25e65aa53acbcb8"><td class="memItemLeft" align="right" valign="top"><a id="af803f43acdb465ead25e65aa53acbcb8"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_cbor</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; uint8_t &gt; o)</td></tr>
<tr class="separator:af803f43acdb465ead25e65aa53acbcb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a356ef3e5eed7946f7ff1e20501054aea"><td class="memItemLeft" align="right" valign="top"><a id="a356ef3e5eed7946f7ff1e20501054aea"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_cbor</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; char &gt; o)</td></tr>
<tr class="separator:a356ef3e5eed7946f7ff1e20501054aea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4398704ac872368c735b40738ae1c4"><td class="memItemLeft" align="right" valign="top">static std::vector&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j)</td></tr>
<tr class="memdesc:aac4398704ac872368c735b40738ae1c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a MessagePack serialization of a given JSON value <a href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">More...</a><br /></td></tr>
<tr class="separator:aac4398704ac872368c735b40738ae1c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac258abcc5ccb6f5d46c12d5e66fadf98"><td class="memItemLeft" align="right" valign="top"><a id="ac258abcc5ccb6f5d46c12d5e66fadf98"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_msgpack</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; uint8_t &gt; o)</td></tr>
<tr class="separator:ac258abcc5ccb6f5d46c12d5e66fadf98"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a28c815e898071099c3c9326174e01749"><td class="memItemLeft" align="right" valign="top"><a id="a28c815e898071099c3c9326174e01749"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_msgpack</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; char &gt; o)</td></tr>
<tr class="separator:a28c815e898071099c3c9326174e01749"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad87e7cef6373d292b8c6f471c87bfb34"><td class="memItemLeft" align="right" valign="top">static std::vector&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, const bool use_size=false, const bool use_type=false)</td></tr>
<tr class="memdesc:ad87e7cef6373d292b8c6f471c87bfb34"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a UBJSON serialization of a given JSON value <a href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">More...</a><br /></td></tr>
<tr class="separator:ad87e7cef6373d292b8c6f471c87bfb34"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a52df3c307adc4224c4be2723d6a73e4e"><td class="memItemLeft" align="right" valign="top"><a id="a52df3c307adc4224c4be2723d6a73e4e"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_ubjson</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; uint8_t &gt; o, const bool use_size=false, const bool use_type=false)</td></tr>
<tr class="separator:a52df3c307adc4224c4be2723d6a73e4e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac427addfb0fb31b0c482d304557e4461"><td class="memItemLeft" align="right" valign="top"><a id="ac427addfb0fb31b0c482d304557e4461"></a>
static void&#160;</td><td class="memItemRight" valign="bottom"><b>to_ubjson</b> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; char &gt; o, const bool use_size=false, const bool use_type=false)</td></tr>
<tr class="separator:ac427addfb0fb31b0c482d304557e4461"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2dc8fd9d856f74a16a7b4f284571775a"><td class="memItemLeft" align="right" valign="top">static std::vector&lt; uint8_t &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">to_bson</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j)</td></tr>
<tr class="memdesc:a2dc8fd9d856f74a16a7b4f284571775a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes the given JSON object <code>j</code> to BSON and returns a vector containing the corresponding BSON-representation. <a href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">More...</a><br /></td></tr>
<tr class="separator:a2dc8fd9d856f74a16a7b4f284571775a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e352827765f76b007725d2b2b890d45"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0e352827765f76b007725d2b2b890d45">to_bson</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; uint8_t &gt; o)</td></tr>
<tr class="memdesc:a0e352827765f76b007725d2b2b890d45"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes the given JSON object <code>j</code> to BSON and forwards the corresponding BSON-representation to the given output_adapter <code>o</code>. <a href="classnlohmann_1_1basic__json.html#a0e352827765f76b007725d2b2b890d45">More...</a><br /></td></tr>
<tr class="separator:a0e352827765f76b007725d2b2b890d45"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09ed82d52ba52eae2dfaf7a338893fb8"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a09ed82d52ba52eae2dfaf7a338893fb8">to_bson</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;j, detail::output_adapter&lt; char &gt; o)</td></tr>
<tr class="memdesc:a09ed82d52ba52eae2dfaf7a338893fb8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Serializes the given JSON object <code>j</code> to BSON and forwards the corresponding BSON-representation to the given output_adapter <code>o</code>. <a href="classnlohmann_1_1basic__json.html#a09ed82d52ba52eae2dfaf7a338893fb8">More...</a><br /></td></tr>
<tr class="separator:a09ed82d52ba52eae2dfaf7a338893fb8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac771f2c2d0b16f59bc066db900963ba1"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:ac771f2c2d0b16f59bc066db900963ba1"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac771f2c2d0b16f59bc066db900963ba1">from_cbor</a> (InputType &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true, const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a> tag_handler=<a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a>)</td></tr>
<tr class="memdesc:ac771f2c2d0b16f59bc066db900963ba1"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a JSON value from an input in CBOR format <a href="classnlohmann_1_1basic__json.html#ac771f2c2d0b16f59bc066db900963ba1">More...</a><br /></td></tr>
<tr class="separator:ac771f2c2d0b16f59bc066db900963ba1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcb83dba9c83a73524cc28812db2abd4"><td class="memTemplParams" colspan="2">template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:afcb83dba9c83a73524cc28812db2abd4"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#afcb83dba9c83a73524cc28812db2abd4">from_cbor</a> (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true, const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a> tag_handler=<a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a>)</td></tr>
<tr class="separator:afcb83dba9c83a73524cc28812db2abd4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0de100b38bceef049a83e37535bb1481"><td class="memTemplParams" colspan="2"><a id="a0de100b38bceef049a83e37535bb1481"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a0de100b38bceef049a83e37535bb1481"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><b>from_cbor</b> (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true, const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a> tag_handler=<a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a>)</td></tr>
<tr class="separator:a0de100b38bceef049a83e37535bb1481"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aec841f6fd0dfce8fa1d33efe5ec913b7"><td class="memItemLeft" align="right" valign="top"><a id="aec841f6fd0dfce8fa1d33efe5ec913b7"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><b>from_cbor</b> (detail::span_input_adapter &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true, const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a> tag_handler=<a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a>)</td></tr>
<tr class="separator:aec841f6fd0dfce8fa1d33efe5ec913b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d4c61976353f72d2baf8a382936abe4"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a5d4c61976353f72d2baf8a382936abe4"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a5d4c61976353f72d2baf8a382936abe4">from_msgpack</a> (InputType &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="memdesc:a5d4c61976353f72d2baf8a382936abe4"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a JSON value from an input in MessagePack format <a href="classnlohmann_1_1basic__json.html#a5d4c61976353f72d2baf8a382936abe4">More...</a><br /></td></tr>
<tr class="separator:a5d4c61976353f72d2baf8a382936abe4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:abe8f728998a65ebe269931a80fd403d8"><td class="memTemplParams" colspan="2">template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:abe8f728998a65ebe269931a80fd403d8"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#abe8f728998a65ebe269931a80fd403d8">from_msgpack</a> (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:abe8f728998a65ebe269931a80fd403d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a293d6186055b8c5ac1427a6ad67cb921"><td class="memTemplParams" colspan="2"><a id="a293d6186055b8c5ac1427a6ad67cb921"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a293d6186055b8c5ac1427a6ad67cb921"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><b>from_msgpack</b> (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:a293d6186055b8c5ac1427a6ad67cb921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa13fbbed1b6bb041814d6cbc331fb987"><td class="memItemLeft" align="right" valign="top"><a id="aa13fbbed1b6bb041814d6cbc331fb987"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><b>from_msgpack</b> (detail::span_input_adapter &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:aa13fbbed1b6bb041814d6cbc331fb987"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a423ea903bcbe9c52bbdb8084f212293c"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a423ea903bcbe9c52bbdb8084f212293c"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a423ea903bcbe9c52bbdb8084f212293c">from_ubjson</a> (InputType &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="memdesc:a423ea903bcbe9c52bbdb8084f212293c"><td class="mdescLeft">&#160;</td><td class="mdescRight">create a JSON value from an input in UBJSON format <a href="classnlohmann_1_1basic__json.html#a423ea903bcbe9c52bbdb8084f212293c">More...</a><br /></td></tr>
<tr class="separator:a423ea903bcbe9c52bbdb8084f212293c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5e9d5e42fda65ba1f1cb43e383dacf2"><td class="memTemplParams" colspan="2">template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:aa5e9d5e42fda65ba1f1cb43e383dacf2"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#aa5e9d5e42fda65ba1f1cb43e383dacf2">from_ubjson</a> (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:aa5e9d5e42fda65ba1f1cb43e383dacf2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a51b0ac5e00bc9b5086d8bce75ad9a7f6"><td class="memTemplParams" colspan="2"><a id="a51b0ac5e00bc9b5086d8bce75ad9a7f6"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a51b0ac5e00bc9b5086d8bce75ad9a7f6"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><b>from_ubjson</b> (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:a51b0ac5e00bc9b5086d8bce75ad9a7f6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7be13fb30f661f273eacd6b79f27ca7c"><td class="memItemLeft" align="right" valign="top"><a id="a7be13fb30f661f273eacd6b79f27ca7c"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><b>from_ubjson</b> (detail::span_input_adapter &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:a7be13fb30f661f273eacd6b79f27ca7c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7f92545f5bd388d529df7eb27c09b5e8"><td class="memTemplParams" colspan="2">template&lt;typename InputType &gt; </td></tr>
<tr class="memitem:a7f92545f5bd388d529df7eb27c09b5e8"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a7f92545f5bd388d529df7eb27c09b5e8">from_bson</a> (InputType &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="memdesc:a7f92545f5bd388d529df7eb27c09b5e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a JSON value from an input in BSON format. <a href="classnlohmann_1_1basic__json.html#a7f92545f5bd388d529df7eb27c09b5e8">More...</a><br /></td></tr>
<tr class="separator:a7f92545f5bd388d529df7eb27c09b5e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae370fb456fb268caab90714bfc724f31"><td class="memTemplParams" colspan="2">template&lt;typename IteratorType &gt; </td></tr>
<tr class="memitem:ae370fb456fb268caab90714bfc724f31"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae370fb456fb268caab90714bfc724f31">from_bson</a> (IteratorType first, IteratorType last, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:ae370fb456fb268caab90714bfc724f31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6357719d94fd44c069bece3fb7b002ea"><td class="memTemplParams" colspan="2"><a id="a6357719d94fd44c069bece3fb7b002ea"></a>
template&lt;typename T &gt; </td></tr>
<tr class="memitem:a6357719d94fd44c069bece3fb7b002ea"><td class="memTemplItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memTemplItemRight" valign="bottom"><b>from_bson</b> (const T *ptr, std::size_t len, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:a6357719d94fd44c069bece3fb7b002ea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6743ff04db3e121a6aa1a79d821ae0c0"><td class="memItemLeft" align="right" valign="top"><a id="a6743ff04db3e121a6aa1a79d821ae0c0"></a>
static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><b>from_bson</b> (detail::span_input_adapter &amp;&amp;i, const bool strict=true, const bool allow_exceptions=true)</td></tr>
<tr class="separator:a6743ff04db3e121a6aa1a79d821ae0c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
JSON Pointer functions</h2></td></tr>
<tr class="memitem:a0d26844b03de9067a47752b138e28236"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a0d26844b03de9067a47752b138e28236">operator[]</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr)</td></tr>
<tr class="memdesc:a0d26844b03de9067a47752b138e28236"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified element via JSON Pointer <a href="classnlohmann_1_1basic__json.html#a0d26844b03de9067a47752b138e28236">More...</a><br /></td></tr>
<tr class="separator:a0d26844b03de9067a47752b138e28236"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac240ab334bd660975e601b0809c3f1bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac240ab334bd660975e601b0809c3f1bc">operator[]</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr) const</td></tr>
<tr class="memdesc:ac240ab334bd660975e601b0809c3f1bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified element via JSON Pointer <a href="classnlohmann_1_1basic__json.html#ac240ab334bd660975e601b0809c3f1bc">More...</a><br /></td></tr>
<tr class="separator:ac240ab334bd660975e601b0809c3f1bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac07f0518ba7a3af394d37d86753a9845"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac07f0518ba7a3af394d37d86753a9845">at</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr)</td></tr>
<tr class="memdesc:ac07f0518ba7a3af394d37d86753a9845"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified element via JSON Pointer <a href="classnlohmann_1_1basic__json.html#ac07f0518ba7a3af394d37d86753a9845">More...</a><br /></td></tr>
<tr class="separator:ac07f0518ba7a3af394d37d86753a9845"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a92a2e5bde3f9a1a548b367114e4794f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a92a2e5bde3f9a1a548b367114e4794f1">at</a> (const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;ptr) const</td></tr>
<tr class="memdesc:a92a2e5bde3f9a1a548b367114e4794f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">access specified element via JSON Pointer <a href="classnlohmann_1_1basic__json.html#a92a2e5bde3f9a1a548b367114e4794f1">More...</a><br /></td></tr>
<tr class="separator:a92a2e5bde3f9a1a548b367114e4794f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae91348b027208339c94dbbc6fd769929"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ae91348b027208339c94dbbc6fd769929">flatten</a> () const</td></tr>
<tr class="memdesc:ae91348b027208339c94dbbc6fd769929"><td class="mdescLeft">&#160;</td><td class="mdescRight">return flattened JSON value <a href="classnlohmann_1_1basic__json.html#ae91348b027208339c94dbbc6fd769929">More...</a><br /></td></tr>
<tr class="separator:ae91348b027208339c94dbbc6fd769929"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac63d16a141ee5c2046410d2d0ba4cec8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten</a> () const</td></tr>
<tr class="memdesc:ac63d16a141ee5c2046410d2d0ba4cec8"><td class="mdescLeft">&#160;</td><td class="mdescRight">unflatten a previously flattened JSON value <a href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">More...</a><br /></td></tr>
<tr class="separator:ac63d16a141ee5c2046410d2d0ba4cec8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
JSON Patch functions</h2></td></tr>
<tr class="memitem:ac8305b8912441b11af77564542e6d93e"><td class="memItemLeft" align="right" valign="top">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ac8305b8912441b11af77564542e6d93e">diff</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;source, const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;target, const std::string &amp;path=&quot;&quot;)</td></tr>
<tr class="memdesc:ac8305b8912441b11af77564542e6d93e"><td class="mdescLeft">&#160;</td><td class="mdescRight">creates a diff as a JSON patch <a href="classnlohmann_1_1basic__json.html#ac8305b8912441b11af77564542e6d93e">More...</a><br /></td></tr>
<tr class="separator:ac8305b8912441b11af77564542e6d93e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71a1bdafcb0f849479622e9acc8f825b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b">patch</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;json_patch) const</td></tr>
<tr class="memdesc:a71a1bdafcb0f849479622e9acc8f825b"><td class="mdescLeft">&#160;</td><td class="mdescRight">applies a JSON patch <a href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b">More...</a><br /></td></tr>
<tr class="separator:a71a1bdafcb0f849479622e9acc8f825b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
JSON Merge Patch functions</h2></td></tr>
<tr class="memitem:ab68414151f2f3347a71c7a9984f1d72d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classnlohmann_1_1basic__json.html#ab68414151f2f3347a71c7a9984f1d72d">merge_patch</a> (const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;apply_patch)</td></tr>
<tr class="memdesc:ab68414151f2f3347a71c7a9984f1d72d"><td class="mdescLeft">&#160;</td><td class="mdescRight">applies a JSON Merge Patch <a href="classnlohmann_1_1basic__json.html#ab68414151f2f3347a71c7a9984f1d72d">More...</a><br /></td></tr>
<tr class="separator:ab68414151f2f3347a71c7a9984f1d72d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>a class to store JSON values </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ObjectType</td><td>type for JSON objects (<code>std::map</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>) </td></tr>
<tr><td class="paramname">ArrayType</td><td>type for JSON arrays (<code>std::vector</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>) </td></tr>
<tr><td class="paramname">StringType</td><td>type for JSON strings and object keys (<code>std::string</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>) </td></tr>
<tr><td class="paramname">BooleanType</td><td>type for JSON booleans (<code>bool</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>) </td></tr>
<tr><td class="paramname">NumberIntegerType</td><td>type for JSON integer numbers (<code>int64_t</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>) </td></tr>
<tr><td class="paramname">NumberUnsignedType</td><td>type for JSON unsigned integer numbers (<code><code>uint64_t</code></code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>) </td></tr>
<tr><td class="paramname">NumberFloatType</td><td>type for JSON floating-point numbers (<code>double</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>) </td></tr>
<tr><td class="paramname">BinaryType</td><td>type for packed binary data for compatibility with binary serialization formats (<code>std::vector&lt;std::uint8_t&gt;</code> by default; will be used in <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a>) </td></tr>
<tr><td class="paramname">AllocatorType</td><td>type of the allocator to use (<code>std::allocator</code> by default) </td></tr>
<tr><td class="paramname">JSONSerializer</td><td>the serializer to resolve internal calls to <code>to_json()</code> and <code>from_json()</code> (<a class="el" href="structnlohmann_1_1adl__serializer.html">adl_serializer</a> by default)</td></tr>
</table>
</dd>
</dl>
<p>@requirement The class satisfies the following concept requirements:</p><ul>
<li>Basic<ul>
<li><a href="https://en.cppreference.com/w/cpp/named_req/DefaultConstructible">DefaultConstructible</a>: JSON values can be default constructed. The result will be a JSON null value.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/MoveConstructible">MoveConstructible</a>: A JSON value can be constructed from an rvalue argument.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/CopyConstructible">CopyConstructible</a>: A JSON value can be copy-constructed from an lvalue expression.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/MoveAssignable">MoveAssignable</a>: A JSON value van be assigned from an rvalue argument.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/CopyAssignable">CopyAssignable</a>: A JSON value can be copy-assigned from an lvalue expression.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/Destructible">Destructible</a>: JSON values can be destructed.</li>
</ul>
</li>
<li>Layout<ul>
<li><a href="https://en.cppreference.com/w/cpp/named_req/StandardLayoutType">StandardLayoutType</a>: JSON values have <a href="https://en.cppreference.com/w/cpp/language/data_members#Standard_layout">standard layout</a>: All non-static data members are private and standard layout types, the class has no virtual functions or (virtual) base classes.</li>
</ul>
</li>
<li>Library-wide<ul>
<li><a href="https://en.cppreference.com/w/cpp/named_req/EqualityComparable">EqualityComparable</a>: JSON values can be compared with <code>==</code>, see <a class="el" href="classnlohmann_1_1basic__json.html#a122640e7e2db1814fc7bbb3c122ec76e">operator==(const_reference,const_reference)</a>.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/LessThanComparable">LessThanComparable</a>: JSON values can be compared with <code>&lt;</code>, see <a class="el" href="classnlohmann_1_1basic__json.html#aacd442b66140c764c594ac8ad7dfd5b3">operator&lt;(const_reference,const_reference)</a>.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/Swappable">Swappable</a>: Any JSON lvalue or rvalue of can be swapped with any lvalue or rvalue of other compatible types, using unqualified function call <a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f">swap()</a>.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/NullablePointer">NullablePointer</a>: JSON values can be compared against <code>std::nullptr_t</code> objects which are used to model the <code>null</code> value.</li>
</ul>
</li>
<li>Container<ul>
<li><a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a>: JSON values can be used like STL containers and provide iterator access.</li>
<li><a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a>; JSON values can be used like STL containers and provide reverse iterator access.</li>
</ul>
</li>
</ul>
<dl class="section invariant"><dt>Invariant</dt><dd>The member variables <em>m_value</em> and <em>m_type</em> have the following relationship:<ul>
<li>If <code>m_type == <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985aa8cfde6331bd59eb2ac96f8911c4b666" title="object (unordered set of name/value pairs)">value_t::object</a></code>, then <code>m_value.object != nullptr</code>.</li>
<li>If <code>m_type == <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985af1f713c9e000f5d3f280adbd124df4f5" title="array (ordered collection of values)">value_t::array</a></code>, then <code>m_value.array != nullptr</code>.</li>
<li>If <code>m_type == <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ab45cffe084dd3d20d928bee85e7b0f21" title="string value">value_t::string</a></code>, then <code>m_value.string != nullptr</code>. The invariants are checked by member function <a class="el" href="classnlohmann_1_1basic__json.html#aebf93a806247231640c785fbc6985d10" title="checks the class invariants">assert_invariant()</a>.</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="http://rfc7159.net/rfc7159">RFC 7159: The JavaScript Object Notation (JSON) Data Interchange Format</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="ac00185487a16455dfdd53884f678040d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac00185487a16455dfdd53884f678040d">&#9670;&nbsp;</a></span>exception</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">nlohmann::basic_json::exception</a> = <a class="el" href="classnlohmann_1_1detail_1_1exception.html">detail::exception</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>general exception of the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class </p>
<p>This class is an extension of <code>std::exception</code> objects with a member <em>id</em> for exception ids. It is used as the base class for all exceptions thrown by the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> class. This class can hence be used as "wildcard" to catch exceptions.</p>
<p>Subclasses:</p><ul>
<li><a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> for exceptions indicating a parse error</li>
<li><a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> for exceptions indicating errors with iterators</li>
<li><a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> for exceptions indicating executing a member function with a wrong type</li>
<li><a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> for exceptions indicating access out of the defined range</li>
<li><a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> for exceptions indicating other library errors</li>
</ul>
<p>@liveexample{The following code shows how arbitrary library exceptions can be caught.,exception}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a3b1a24eaf07f81ee9cbf01e29cf8fb59"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b1a24eaf07f81ee9cbf01e29cf8fb59">&#9670;&nbsp;</a></span>parse_error</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">nlohmann::basic_json::parse_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1parse__error.html">detail::parse_error</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>exception indicating a parse error </p>
<p>This exception is thrown by the library when a parse error occurs. Parse errors can occur during the deserialization of JSON text, CBOR, MessagePack, as well as when using JSON Patch.</p>
<p>Member <em>byte</em> holds the byte index of the last read character in the input file.</p>
<p>Exceptions have ids 1xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.101 </td><td class="markdownTableBodyNone">parse error at 2: unexpected end of input; expected string literal </td><td class="markdownTableBodyNone">This error indicates a syntax error while deserializing a JSON text. The error message describes that an unexpected token (character) was encountered, and the member <em>byte</em> indicates the error position. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.102 </td><td class="markdownTableBodyNone">parse error at 14: missing or wrong low surrogate </td><td class="markdownTableBodyNone">JSON uses the <code>\uxxxx</code> format to describe Unicode characters. Code points above above 0xFFFF are split into two <code>\uxxxx</code> entries ("surrogate pairs"). This error indicates that the surrogate pair is incomplete or contains an invalid code point. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.103 </td><td class="markdownTableBodyNone">parse error: code points above 0x10FFFF are invalid </td><td class="markdownTableBodyNone">Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.104 </td><td class="markdownTableBodyNone">parse error: JSON patch must be an array of objects </td><td class="markdownTableBodyNone"><a href="https://tools.ietf.org/html/rfc6902">RFC 6902</a> requires a JSON Patch document to be a JSON document that represents an array of objects. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.105 </td><td class="markdownTableBodyNone">parse error: operation must have string member 'op' </td><td class="markdownTableBodyNone">An operation of a JSON Patch document must contain exactly one "op" member, whose value indicates the operation to perform. Its value must be one of "add", "remove", "replace", "move", "copy", or "test"; other values are errors. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.106 </td><td class="markdownTableBodyNone">parse error: array index '01' must not begin with '0' </td><td class="markdownTableBodyNone">An array index in a JSON Pointer (<a href="https://tools.ietf.org/html/rfc6901">RFC 6901</a>) may be <code>0</code> or any number without a leading <code>0</code>. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.107 </td><td class="markdownTableBodyNone">parse error: JSON pointer must be empty or begin with '/' - was: 'foo' </td><td class="markdownTableBodyNone">A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a <code>/</code> character. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.108 </td><td class="markdownTableBodyNone">parse error: escape character '~' must be followed with '0' or '1' </td><td class="markdownTableBodyNone">In a JSON Pointer, only <code>~0</code> and <code>~1</code> are valid escape sequences. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.109 </td><td class="markdownTableBodyNone">parse error: array index 'one' is not a number </td><td class="markdownTableBodyNone">A JSON Pointer array index must be a number. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.110 </td><td class="markdownTableBodyNone">parse error at 1: cannot read 2 bytes from vector </td><td class="markdownTableBodyNone">When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.112 </td><td class="markdownTableBodyNone">parse error at 1: error reading CBOR; last byte: 0xF8 </td><td class="markdownTableBodyNone">Not all types of CBOR or MessagePack are supported. This exception occurs if an unsupported byte was read. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.113 </td><td class="markdownTableBodyNone">parse error at 2: expected a CBOR string; last byte: 0x98 </td><td class="markdownTableBodyNone">While parsing a map key, a value that is not a string has been read. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.parse_error.114 </td><td class="markdownTableBodyNone">parse error: Unsupported BSON record type 0x0F </td><td class="markdownTableBodyNone">The parsing of the corresponding BSON record type is not implemented (yet). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.parse_error.115 </td><td class="markdownTableBodyNone">parse error at byte 5: syntax error while parsing UBJSON high-precision number: invalid number text: 1A </td><td class="markdownTableBodyNone">A UBJSON high-precision number could not be parsed. </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>For an input with n bytes, 1 is the index of the first character and n+1 is the index of the terminating null byte or the end of file. This also holds true when reading a byte vector (CBOR or MessagePack).</dd></dl>
<p>@liveexample{The following code shows how a <code>parse_error</code> exception can be caught.,parse_error}</p>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> for exceptions indicating errors with iterators </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> for exceptions indicating executing a member function with a wrong <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> for exceptions indicating access out of the defined range </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> for exceptions indicating other library errors</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a5e6b5db267db5a283e770296f9e410a0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e6b5db267db5a283e770296f9e410a0">&#9670;&nbsp;</a></span>invalid_iterator</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">nlohmann::basic_json::invalid_iterator</a> = <a class="el" href="classnlohmann_1_1detail_1_1invalid__iterator.html">detail::invalid_iterator</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>exception indicating errors with iterators </p>
<p>This exception is thrown if iterators passed to a library function do not match the expected semantics.</p>
<p>Exceptions have ids 2xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.201 </td><td class="markdownTableBodyNone">iterators are not compatible </td><td class="markdownTableBodyNone">The iterators passed to constructor <a class="el" href="classnlohmann_1_1basic__json.html#a3fb693444043639e08ff7be62410b137">basic_json(InputIT first, InputIT last)</a> are not compatible, meaning they do not belong to the same container. Therefore, the range (<em>first</em>, <em>last</em>) is invalid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.202 </td><td class="markdownTableBodyNone">iterator does not fit current value </td><td class="markdownTableBodyNone">In an erase or insert function, the passed iterator <em>pos</em> does not belong to the JSON value for which the function was called. It hence does not define a valid position for the deletion/insertion. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.203 </td><td class="markdownTableBodyNone">iterators do not fit current value </td><td class="markdownTableBodyNone">Either iterator passed to function <a class="el" href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">erase(IteratorType first, IteratorType last)</a> does not belong to the JSON value from which values shall be erased. It hence does not define a valid range to delete values from. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.204 </td><td class="markdownTableBodyNone">iterators out of range </td><td class="markdownTableBodyNone">When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an erase function, this range has to be exactly (<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a>), because this is the only way the single stored value is expressed. All other ranges are invalid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.205 </td><td class="markdownTableBodyNone">iterator out of range </td><td class="markdownTableBodyNone">When an iterator for a primitive type (number, boolean, or string) is passed to an erase function, the iterator has to be the <a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> iterator, because it is the only way to address the stored value. All other iterators are invalid. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.206 </td><td class="markdownTableBodyNone">cannot construct with iterators from null </td><td class="markdownTableBodyNone">The iterators passed to constructor <a class="el" href="classnlohmann_1_1basic__json.html#a3fb693444043639e08ff7be62410b137">basic_json(InputIT first, InputIT last)</a> belong to a JSON null value and hence to not define a valid range. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.207 </td><td class="markdownTableBodyNone">cannot use key() for non-object iterators </td><td class="markdownTableBodyNone">The key() member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.208 </td><td class="markdownTableBodyNone">cannot use operator[] for object iterators </td><td class="markdownTableBodyNone">The operator[] to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.209 </td><td class="markdownTableBodyNone">cannot use offsets with object iterators </td><td class="markdownTableBodyNone">The offset operators (+, -, +=, -=) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.210 </td><td class="markdownTableBodyNone">iterators do not fit </td><td class="markdownTableBodyNone">The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (<em>first</em>, <em>last</em>) is invalid. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.211 </td><td class="markdownTableBodyNone">passed iterators may not belong to container </td><td class="markdownTableBodyNone">The iterator range passed to the insert function must not be a subrange of the container to insert to. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.212 </td><td class="markdownTableBodyNone">cannot compare iterators of different containers </td><td class="markdownTableBodyNone">When two iterators are compared, they must belong to the same container. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.213 </td><td class="markdownTableBodyNone">cannot compare order of object iterators </td><td class="markdownTableBodyNone">The order of object iterators cannot be compared, because JSON objects are unordered. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.invalid_iterator.214 </td><td class="markdownTableBodyNone">cannot get value </td><td class="markdownTableBodyNone">Cannot get value for iterator: Either the iterator belongs to a null value or it is an iterator to a primitive type (number, boolean, or string), but the iterator is different to <a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a>. </td></tr>
</table>
<p>@liveexample{The following code shows how an <code>invalid_iterator</code> exception can be caught.,invalid_iterator}</p>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> for exceptions indicating a <a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse</a> error </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> for exceptions indicating executing a member function with a wrong <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> for exceptions indicating access out of the defined range </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> for exceptions indicating other library errors</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a79473de577bb3f28ef0aa6e9f1571b52"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79473de577bb3f28ef0aa6e9f1571b52">&#9670;&nbsp;</a></span>type_error</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">nlohmann::basic_json::type_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1type__error.html">detail::type_error</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>exception indicating executing a member function with a wrong type </p>
<p>This exception is thrown in case of a type error; that is, a library function is executed on a JSON value whose type does not match the expected semantics.</p>
<p>Exceptions have ids 3xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.301 </td><td class="markdownTableBodyNone">cannot create object from initializer list </td><td class="markdownTableBodyNone">To create an object from an initializer list, the initializer list must consist only of a list of pairs whose first element is a string. When this constraint is violated, an array is created instead. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.302 </td><td class="markdownTableBodyNone">type must be object, but is array </td><td class="markdownTableBodyNone">During implicit or explicit value conversion, the JSON type must be compatible to the target type. For instance, a JSON string can only be converted into string types, but not into numbers or boolean types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.303 </td><td class="markdownTableBodyNone">incompatible ReferenceType for get_ref, actual type is object </td><td class="markdownTableBodyNone">To retrieve a reference to a value stored in a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> object with <a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d">get_ref</a>, the type of the reference must match the value type. For instance, for a JSON array, the <em>ReferenceType</em> must be <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> &amp;. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.304 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">at()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.305 </td><td class="markdownTableBodyNone">cannot use operator[] with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a05c86efa156004b090258c1469eab3fd">operator[]</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.306 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.307 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f" title="remove element given an iterator">erase()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">erase()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.308 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6">push_back()</a> and <a class="el" href="classnlohmann_1_1basic__json.html#afe3c79845dc1dd2243724558859d7e4b">operator+=</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.309 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a> with </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62">insert()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.310 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a> with number </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f">swap()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.311 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#a58837bac1c40038dcb07f437a02735da" title="add an object to an array">emplace_back()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a58837bac1c40038dcb07f437a02735da">emplace_back()</a> member function can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.312 </td><td class="markdownTableBodyNone">cannot use <a class="el" href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85" title="updates a JSON object from another object, overwriting existing keys">update()</a> with string </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85">update()</a> member functions can only be executed for certain JSON types. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.313 </td><td class="markdownTableBodyNone">invalid value to unflatten </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten</a> function converts an object whose keys are JSON Pointers back into an arbitrary nested JSON value. The JSON Pointers must not overlap, because then the resulting value would not be well defined. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.314 </td><td class="markdownTableBodyNone">only objects can be unflattened </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten</a> function only works for an object whose keys are JSON Pointers. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.315 </td><td class="markdownTableBodyNone">values in object must be primitive </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten</a> function only works for an object whose keys are JSON Pointers and whose values are primitive. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.type_error.316 </td><td class="markdownTableBodyNone">invalid UTF-8 byte at index 10: 0x7E </td><td class="markdownTableBodyNone">The <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump</a> function only works with UTF-8 encoded strings; that is, if you assign a <code>std::string</code> to a JSON value, make sure it is UTF-8 encoded. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.type_error.317 </td><td class="markdownTableBodyNone">JSON value cannot be serialized to requested format </td><td class="markdownTableBodyNone">The dynamic type of the object cannot be represented in the requested serialization format (e.g. a raw <code>true</code> or <code>null</code> JSON object cannot be serialized to BSON) </td></tr>
</table>
<p>@liveexample{The following code shows how a <code>type_error</code> exception can be caught.,type_error}</p>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> for exceptions indicating a <a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse</a> error </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> for exceptions indicating errors with iterators </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> for exceptions indicating access out of the defined range </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> for exceptions indicating other library errors</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a2e8fc803a09152f3174470ea2375b383"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e8fc803a09152f3174470ea2375b383">&#9670;&nbsp;</a></span>out_of_range</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">nlohmann::basic_json::out_of_range</a> = <a class="el" href="classnlohmann_1_1detail_1_1out__of__range.html">detail::out_of_range</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>exception indicating access out of the defined range </p>
<p>This exception is thrown in case a library function is called on an input parameter that exceeds the expected range, for instance in case of array indices or nonexisting object keys.</p>
<p>Exceptions have ids 4xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.out_of_range.401 </td><td class="markdownTableBodyNone">array index 3 is out of range </td><td class="markdownTableBodyNone">The provided array index <em>i</em> is larger than <em>size-1</em>. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.out_of_range.402 </td><td class="markdownTableBodyNone">array index '-' (3) is out of range </td><td class="markdownTableBodyNone">The special array index <code>-</code> in a JSON Pointer never describes a valid element of the array, but the index past the end. That is, it can only be used to add elements at this position, but not to read it. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.out_of_range.403 </td><td class="markdownTableBodyNone">key 'foo' not found </td><td class="markdownTableBodyNone">The provided key was not found in the JSON object. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.out_of_range.404 </td><td class="markdownTableBodyNone">unresolved reference token 'foo' </td><td class="markdownTableBodyNone">A reference token in a JSON Pointer could not be resolved. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.out_of_range.405 </td><td class="markdownTableBodyNone">JSON pointer has no parent </td><td class="markdownTableBodyNone">The JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON value. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.out_of_range.406 </td><td class="markdownTableBodyNone">number overflow parsing '10E1000' </td><td class="markdownTableBodyNone">A parsed number could not be stored as without changing it to NaN or INF. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.out_of_range.407 </td><td class="markdownTableBodyNone">number overflow serializing '9223372036854775808' </td><td class="markdownTableBodyNone">UBJSON and BSON only support integer numbers up to 9223372036854775807. (until version 3.8.0) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">json.exception.out_of_range.408 </td><td class="markdownTableBodyNone">excessive array size: 8658170730974374167 </td><td class="markdownTableBodyNone">The size (following <code>#</code>) of an UBJSON array or object exceeds the maximal capacity. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.out_of_range.409 </td><td class="markdownTableBodyNone">BSON key cannot contain code point U+0000 (at byte 2) </td><td class="markdownTableBodyNone">Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string </td></tr>
</table>
<p>@liveexample{The following code shows how an <code>out_of_range</code> exception can be caught.,out_of_range}</p>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> for exceptions indicating a <a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse</a> error </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> for exceptions indicating errors with iterators </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> for exceptions indicating executing a member function with a wrong <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">other_error</a> for exceptions indicating other library errors</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a48d5c5750a7f3164653bd8d3e1e8c893"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a48d5c5750a7f3164653bd8d3e1e8c893">&#9670;&nbsp;</a></span>other_error</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a48d5c5750a7f3164653bd8d3e1e8c893">nlohmann::basic_json::other_error</a> = <a class="el" href="classnlohmann_1_1detail_1_1other__error.html">detail::other_error</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>exception indicating other library errors </p>
<p>This exception is thrown in case of errors that cannot be classified with the other exception types.</p>
<p>Exceptions have ids 5xx.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">name / id </th><th class="markdownTableHeadNone">example message </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">json.exception.other_error.501 </td><td class="markdownTableBodyNone">unsuccessful: {"op":"test","path":"/baz", "value":"bar"} </td><td class="markdownTableBodyNone">A JSON Patch operation 'test' failed. The unsuccessful operation is also printed. </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd>- <a class="el" href="classnlohmann_1_1basic__json.html#ac00185487a16455dfdd53884f678040d">exception</a> for the base class of the library exceptions </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a3b1a24eaf07f81ee9cbf01e29cf8fb59">parse_error</a> for exceptions indicating a <a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse</a> error </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a5e6b5db267db5a283e770296f9e410a0">invalid_iterator</a> for exceptions indicating errors with iterators </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a79473de577bb3f28ef0aa6e9f1571b52">type_error</a> for exceptions indicating executing a member function with a wrong <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> </dd>
<dd>
- <a class="el" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a> for exceptions indicating access out of the defined range</dd></dl>
<p>@liveexample{The following code shows how an <code>other_error</code> exception can be caught.,other_error}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a949272bf6af5eb8eab9675505422f5b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a949272bf6af5eb8eab9675505422f5b3">&#9670;&nbsp;</a></span>object_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">nlohmann::basic_json::object_t</a> = ObjectType&lt;StringType, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>, object_comparator_t, AllocatorType&lt;std::pair&lt;const StringType, <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&gt; &gt;&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for an object </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes JSON objects as follows: </p><blockquote class="doxtable">
<p>An object is an unordered collection of zero or more name/value pairs, where a name is a string and a value is a string, number, boolean, null, object, or array. </p>
</blockquote>
<p>To store objects in C++, a type is defined by the template parameters described below.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ObjectType</td><td>the container to store objects (e.g., <code>std::map</code> or <code>std::unordered_map</code>) </td></tr>
<tr><td class="paramname">StringType</td><td>the type of the keys or names (e.g., <code>std::string</code>). The comparison function <code>std::less&lt;StringType&gt;</code> is used to order elements inside the container. </td></tr>
<tr><td class="paramname">AllocatorType</td><td>the allocator to use for objects (e.g., <code>std::allocator</code>)</td></tr>
</table>
</dd>
</dl>
<h4><a class="anchor" id="autotoc_md0"></a>
Default type</h4>
<p>With the default values for <em>ObjectType</em> (<code>std::map</code>), <em>StringType</em> (<code>std::string</code>), and <em>AllocatorType</em> (<code>std::allocator</code>), the default value for <em>object_t</em> is:</p>
<div class="fragment"><div class="line">std::map&lt;</div>
<div class="line"> std::string, <span class="comment">// key_type</span></div>
<div class="line"> <a class="code" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json</a>, <span class="comment">// value_type</span></div>
<div class="line"> std::less&lt;std::string&gt;, <span class="comment">// key_compare</span></div>
<div class="line"> std::allocator&lt;std::pair&lt;const std::string, basic_json&gt;&gt; <span class="comment">// allocator_type</span></div>
<div class="line">&gt;</div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md1"></a>
Behavior</h4>
<p>The choice of <em>object_t</em> influences the behavior of the JSON class. With the default type, objects have the following behavior:</p>
<ul>
<li>When all names are unique, objects will be interoperable in the sense that all software implementations receiving that object will agree on the name-value mappings.</li>
<li>When the names within an object are not unique, it is unspecified which one of the values for a given key will be chosen. For instance, <code>{"key": 2, "key": 1}</code> could be equal to either <code>{"key": 1}</code> or <code>{"key": 2}</code>.</li>
<li>Internally, name/value pairs are stored in lexicographical order of the names. Objects will also be serialized (see <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump</a>) in this order. For instance, <code>{"b": 1, "a": 2}</code> and <code>{"a": 2, "b": 1}</code> will be stored and serialized as <code>{"a": 2, "b": 1}</code>.</li>
<li>When comparing objects, the order of the name/value pairs is irrelevant. This makes objects interoperable in the sense that they will not be affected by these differences. For instance, <code>{"b": 1, "a": 2}</code> and <code>{"a": 2, "b": 1}</code> will be treated as equal.</li>
</ul>
<h4><a class="anchor" id="autotoc_md2"></a>
Limits</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> specifies: </p><blockquote class="doxtable">
<p>An implementation may set limits on the maximum depth of nesting. </p>
</blockquote>
<p>In this class, the object's limit of nesting is not explicitly constrained. However, a maximum depth of nesting may be introduced by the compiler or runtime environment. A theoretical limit can be queried by calling the <a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f">max_size</a> function of a JSON object.</p>
<h4><a class="anchor" id="autotoc_md3"></a>
Storage</h4>
<p>Objects are stored as pointers in a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type. That is, for any access to object values, a pointer of type <code>object_t*</code> must be dereferenced.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for an <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The order name/value pairs are added to the object is <em>not</em> preserved by the library. Therefore, iterating an object may return name/value pairs in a different order than they were originally stored. In fact, keys will be traversed in alphabetical order as <code>std::map</code> with <code>std::less</code> is used by default. Please note this behavior conforms to <a href="http://rfc7159.net/rfc7159">RFC 7159</a>, because any order implements the specified "unordered" nature of JSON objects. </dd></dl>
</div>
</div>
<a id="a69524b1f8f42c0a81b86cee3fc54e034"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a69524b1f8f42c0a81b86cee3fc54e034">&#9670;&nbsp;</a></span>array_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">nlohmann::basic_json::array_t</a> = ArrayType&lt;<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>, AllocatorType&lt;<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&gt; &gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for an array </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes JSON arrays as follows: </p><blockquote class="doxtable">
<p>An array is an ordered sequence of zero or more values. </p>
</blockquote>
<p>To store objects in C++, a type is defined by the template parameters explained below.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ArrayType</td><td>container type to store arrays (e.g., <code>std::vector</code> or <code>std::list</code>) </td></tr>
<tr><td class="paramname">AllocatorType</td><td>allocator to use for arrays (e.g., <code>std::allocator</code>)</td></tr>
</table>
</dd>
</dl>
<h4><a class="anchor" id="autotoc_md4"></a>
Default type</h4>
<p>With the default values for <em>ArrayType</em> (<code>std::vector</code>) and <em>AllocatorType</em> (<code>std::allocator</code>), the default value for <em>array_t</em> is:</p>
<div class="fragment"><div class="line">std::vector&lt;</div>
<div class="line"> <a class="code" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json</a>, <span class="comment">// value_type</span></div>
<div class="line"> std::allocator&lt;basic_json&gt; <span class="comment">// allocator_type</span></div>
<div class="line">&gt;</div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md5"></a>
Limits</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> specifies: </p><blockquote class="doxtable">
<p>An implementation may set limits on the maximum depth of nesting. </p>
</blockquote>
<p>In this class, the array's limit of nesting is not explicitly constrained. However, a maximum depth of nesting may be introduced by the compiler or runtime environment. A theoretical limit can be queried by calling the <a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f">max_size</a> function of a JSON array.</p>
<h4><a class="anchor" id="autotoc_md6"></a>
Storage</h4>
<p>Arrays are stored as pointers in a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type. That is, for any access to array values, a pointer of type <code>array_t*</code> must be dereferenced.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a561057a2cc70397ad0ab890745d1d7c7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a561057a2cc70397ad0ab890745d1d7c7">&#9670;&nbsp;</a></span>string_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">nlohmann::basic_json::string_t</a> = StringType</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a string </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes JSON strings as follows: </p><blockquote class="doxtable">
<p>A string is a sequence of zero or more Unicode characters. </p>
</blockquote>
<p>To store objects in C++, a type is defined by the template parameter described below. Unicode values are split by the JSON class into byte-sized characters during deserialization.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">StringType</td><td>the container to store strings (e.g., <code>std::string</code>). Note this container is used for keys/names in objects, see <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>.</td></tr>
</table>
</dd>
</dl>
<h4><a class="anchor" id="autotoc_md7"></a>
Default type</h4>
<p>With the default values for <em>StringType</em> (<code>std::string</code>), the default value for <em>string_t</em> is:</p>
<div class="fragment"><div class="line">std::string</div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md8"></a>
Encoding</h4>
<p>Strings are stored in UTF-8 encoding. Therefore, functions like <code>std::string::size()</code> or <code>std::string::length()</code> return the number of bytes in the string rather than the number of characters or glyphs.</p>
<h4><a class="anchor" id="autotoc_md9"></a>
String comparison</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> states: </p><blockquote class="doxtable">
<p>Software implementations are typically required to test names of object members for equality. Implementations that transform the textual representation into sequences of Unicode code units and then perform the comparison numerically, code unit by code unit, are interoperable in the sense that implementations will agree in all cases on equality or inequality of two strings. For example, implementations that compare strings with escaped characters unconverted may incorrectly find that <code>"a\\b"</code> and <code>"a\u005Cb"</code> are not equal. </p>
</blockquote>
<p>This implementation is interoperable as it does compare strings code unit by code unit.</p>
<h4><a class="anchor" id="autotoc_md10"></a>
Storage</h4>
<p>String values are stored as pointers in a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type. That is, for any access to string values, a pointer of type <code>string_t*</code> must be dereferenced.</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a8cc04e22d7ef18efd2d34bc04eb6a1b2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8cc04e22d7ef18efd2d34bc04eb6a1b2">&#9670;&nbsp;</a></span>boolean_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">nlohmann::basic_json::boolean_t</a> = BooleanType</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a boolean </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> implicitly describes a boolean as a type which differentiates the two literals <code>true</code> and <code>false</code>.</p>
<p>To store objects in C++, a type is defined by the template parameter <em>BooleanType</em> which chooses the type to use.</p>
<h4><a class="anchor" id="autotoc_md11"></a>
Default type</h4>
<p>With the default values for <em>BooleanType</em> (<code>bool</code>), the default value for <em>boolean_t</em> is:</p>
<div class="fragment"><div class="line"><span class="keywordtype">bool</span></div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md12"></a>
Storage</h4>
<p>Boolean values are stored directly inside a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type.</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ab227d71ad47b6ed6a3acae52dedbb49d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab227d71ad47b6ed6a3acae52dedbb49d">&#9670;&nbsp;</a></span>number_integer_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">nlohmann::basic_json::number_integer_t</a> = NumberIntegerType</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a number (integer) </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes numbers as follows: </p><blockquote class="doxtable">
<p>The representation of numbers is similar to that used in most programming languages. A number is represented in base 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted. </p>
</blockquote>
<p>This description includes both integer and floating-point numbers. However, C++ allows more precise storage if it is known whether the number is a signed integer, an unsigned integer or a floating-point number. Therefore, three different types, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> are used.</p>
<p>To store integer numbers in C++, a type is defined by the template parameter <em>NumberIntegerType</em> which chooses the type to use.</p>
<h4><a class="anchor" id="autotoc_md13"></a>
Default type</h4>
<p>With the default values for <em>NumberIntegerType</em> (<code>int64_t</code>), the default value for <em>number_integer_t</em> is:</p>
<div class="fragment"><div class="line">int64_t</div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md14"></a>
Default behavior</h4>
<ul>
<li>The restrictions about leading zeros is not enforced in C++. Instead, leading zeros in integer literals lead to an interpretation as octal number. Internally, the value will be stored as decimal number. For instance, the C++ integer literal <code>010</code> will be serialized to <code>8</code>. During deserialization, leading zeros yield an error.</li>
<li>Not-a-number (NaN) values will be serialized to <code>null</code>.</li>
</ul>
<h4><a class="anchor" id="autotoc_md15"></a>
Limits</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> specifies: </p><blockquote class="doxtable">
<p>An implementation may set limits on the range and precision of numbers. </p>
</blockquote>
<p>When the default type is used, the maximal integer number that can be stored is <code>9223372036854775807</code> (INT64_MAX) and the minimal integer number that can be stored is <code>-9223372036854775808</code> (INT64_MIN). Integer numbers that are out of range will yield over/underflow when used in a constructor. During deserialization, too large or small integer numbers will be automatically be stored as <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>.</p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> further states: </p><blockquote class="doxtable">
<p>Note that when such software is used, numbers that are integers and are in the range <img class="formulaInl" alt="$[-2^{53}+1, 2^{53}-1]$" src="form_0.png"/> are interoperable in the sense that implementations will agree exactly on their numeric values. </p>
</blockquote>
<p>As this range is a subrange of the exactly supported range [INT64_MIN, INT64_MAX], this class's integer type is interoperable.</p>
<h4><a class="anchor" id="autotoc_md16"></a>
Storage</h4>
<p>Integer number values are stored directly inside a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (floating-point)</dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (unsigned integer)</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a440094de5ef4e119b2771b549b33da70"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a440094de5ef4e119b2771b549b33da70">&#9670;&nbsp;</a></span>number_unsigned_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">nlohmann::basic_json::number_unsigned_t</a> = NumberUnsignedType</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a number (unsigned) </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes numbers as follows: </p><blockquote class="doxtable">
<p>The representation of numbers is similar to that used in most programming languages. A number is represented in base 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted. </p>
</blockquote>
<p>This description includes both integer and floating-point numbers. However, C++ allows more precise storage if it is known whether the number is a signed integer, an unsigned integer or a floating-point number. Therefore, three different types, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> are used.</p>
<p>To store unsigned integer numbers in C++, a type is defined by the template parameter <em>NumberUnsignedType</em> which chooses the type to use.</p>
<h4><a class="anchor" id="autotoc_md17"></a>
Default type</h4>
<p>With the default values for <em>NumberUnsignedType</em> (<code>uint64_t</code>), the default value for <em>number_unsigned_t</em> is:</p>
<div class="fragment"><div class="line">uint64_t</div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md18"></a>
Default behavior</h4>
<ul>
<li>The restrictions about leading zeros is not enforced in C++. Instead, leading zeros in integer literals lead to an interpretation as octal number. Internally, the value will be stored as decimal number. For instance, the C++ integer literal <code>010</code> will be serialized to <code>8</code>. During deserialization, leading zeros yield an error.</li>
<li>Not-a-number (NaN) values will be serialized to <code>null</code>.</li>
</ul>
<h4><a class="anchor" id="autotoc_md19"></a>
Limits</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> specifies: </p><blockquote class="doxtable">
<p>An implementation may set limits on the range and precision of numbers. </p>
</blockquote>
<p>When the default type is used, the maximal integer number that can be stored is <code>18446744073709551615</code> (UINT64_MAX) and the minimal integer number that can be stored is <code>0</code>. Integer numbers that are out of range will yield over/underflow when used in a constructor. During deserialization, too large or small integer numbers will be automatically be stored as <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>.</p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> further states: </p><blockquote class="doxtable">
<p>Note that when such software is used, numbers that are integers and are in the range <img class="formulaInl" alt="$[-2^{53}+1, 2^{53}-1]$" src="form_0.png"/> are interoperable in the sense that implementations will agree exactly on their numeric values. </p>
</blockquote>
<p>As this range is a subrange (when considered in conjunction with the number_integer_t type) of the exactly supported range [0, UINT64_MAX], this class's integer type is interoperable.</p>
<h4><a class="anchor" id="autotoc_md20"></a>
Storage</h4>
<p>Integer number values are stored directly inside a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (floating-point) </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (integer)</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ade1eb06e9fc3ff2ba1efd709b94b401d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade1eb06e9fc3ff2ba1efd709b94b401d">&#9670;&nbsp;</a></span>number_float_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">nlohmann::basic_json::number_float_t</a> = NumberFloatType</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a number (floating-point) </p>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> describes numbers as follows: </p><blockquote class="doxtable">
<p>The representation of numbers is similar to that used in most programming languages. A number is represented in base 10 using decimal digits. It contains an integer component that may be prefixed with an optional minus sign, which may be followed by a fraction part and/or an exponent part. Leading zeros are not allowed. (...) Numeric values that cannot be represented in the grammar below (such as Infinity and NaN) are not permitted. </p>
</blockquote>
<p>This description includes both integer and floating-point numbers. However, C++ allows more precise storage if it is known whether the number is a signed integer, an unsigned integer or a floating-point number. Therefore, three different types, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a> are used.</p>
<p>To store floating-point numbers in C++, a type is defined by the template parameter <em>NumberFloatType</em> which chooses the type to use.</p>
<h4><a class="anchor" id="autotoc_md21"></a>
Default type</h4>
<p>With the default values for <em>NumberFloatType</em> (<code>double</code>), the default value for <em>number_float_t</em> is:</p>
<div class="fragment"><div class="line"><span class="keywordtype">double</span></div>
</div><!-- fragment --><h4><a class="anchor" id="autotoc_md22"></a>
Default behavior</h4>
<ul>
<li>The restrictions about leading zeros is not enforced in C++. Instead, leading zeros in floating-point literals will be ignored. Internally, the value will be stored as decimal number. For instance, the C++ floating-point literal <code>01.2</code> will be serialized to <code>1.2</code>. During deserialization, leading zeros yield an error.</li>
<li>Not-a-number (NaN) values will be serialized to <code>null</code>.</li>
</ul>
<h4><a class="anchor" id="autotoc_md23"></a>
Limits</h4>
<p><a href="http://rfc7159.net/rfc7159">RFC 7159</a> states: </p><blockquote class="doxtable">
<p>This specification allows implementations to set limits on the range and precision of numbers accepted. Since software that implements IEEE 754-2008 binary64 (double precision) numbers is generally available and widely used, good interoperability can be achieved by implementations that expect no more precision or range than these provide, in the sense that implementations will approximate JSON numbers within the expected precision. </p>
</blockquote>
<p>This implementation does exactly follow this approach, as it uses double precision floating-point numbers. Note values smaller than <code>-1.79769313486232e+308</code> and values greater than <code>1.79769313486232e+308</code> will be stored as NaN internally and be serialized to <code>null</code>.</p>
<h4><a class="anchor" id="autotoc_md24"></a>
Storage</h4>
<p>Floating-point number values are stored directly inside a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (integer)</dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> for number values (unsigned integer)</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="acbf51bc13484009ed204bd78a498355e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbf51bc13484009ed204bd78a498355e">&#9670;&nbsp;</a></span>binary_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">nlohmann::basic_json::binary_t</a> = <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html">nlohmann::byte_container_with_subtype</a>&lt;BinaryType&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>a type for a packed binary type </p>
<p>This type is a type designed to carry binary data that appears in various serialized formats, such as CBOR's Major Type 2, MessagePack's bin, and BSON's generic binary subtype. This type is NOT a part of standard JSON and exists solely for compatibility with these binary types. As such, it is simply defined as an ordered sequence of zero or more byte values.</p>
<p>Additionally, as an implementation detail, the subtype of the binary data is carried around as a <code>std::uint8_t</code>, which is compatible with both of the binary data formats that use binary subtyping, (though the specific numbering is incompatible with each other, and it is up to the user to translate between them).</p>
<p><a href="https://tools.ietf.org/html/rfc7049">CBOR's RFC 7049</a> describes this type as: </p><blockquote class="doxtable">
<p>Major type 2: a byte string. The string's length in bytes is represented following the rules for positive integers (major type 0). </p>
</blockquote>
<p><a href="https://github.com/msgpack/msgpack/blob/master/spec.md#bin-format-family">MessagePack's documentation on the bin type family</a> describes this type as: </p><blockquote class="doxtable">
<p>Bin format family stores an byte array in 2, 3, or 5 bytes of extra bytes in addition to the size of the byte array. </p>
</blockquote>
<p><a href="http://bsonspec.org/spec.html">BSON's specifications</a> describe several binary types; however, this type is intended to represent the generic binary type which has the description: </p><blockquote class="doxtable">
<p>Generic binary subtype - This is the most commonly used binary subtype and should be the 'default' for drivers and tools. </p>
</blockquote>
<p>None of these impose any limitations on the internal representation other than the basic unit of storage be some type of array whose parts are decomposable into bytes.</p>
<p>The default representation of this binary format is a <code>std::vector&lt;std::uint8_t&gt;</code>, which is a very common way to represent a byte array in modern C++.</p>
<h4><a class="anchor" id="autotoc_md25"></a>
Default type</h4>
<p>The default values for <em>BinaryType</em> is <code>std::vector&lt;std::uint8_t&gt;</code></p>
<h4><a class="anchor" id="autotoc_md26"></a>
Storage</h4>
<p>Binary Arrays are stored as pointers in a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type. That is, for any access to array values, a pointer of the type <code>binary_t*</code> must be dereferenced.</p>
<h4><a class="anchor" id="autotoc_md27"></a>
Notes on subtypes</h4>
<ul>
<li>CBOR<ul>
<li>Binary values are represented as byte strings. No subtypes are supported and will be ignored when CBOR is written.</li>
</ul>
</li>
<li>MessagePack<ul>
<li>If a subtype is given and the binary array contains exactly 1, 2, 4, 8, or 16 elements, the fixext family (fixext1, fixext2, fixext4, fixext8) is used. For other sizes, the ext family (ext8, ext16, ext32) is used. The subtype is then added as singed 8-bit integer.</li>
<li>If no subtype is given, the bin family (bin8, bin16, bin32) is used.</li>
</ul>
</li>
<li>BSON<ul>
<li>If a subtype is given, it is used and added as unsigned 8-bit integer.</li>
<li>If no subtype is given, the generic binary subtype 0x00 is used.</li>
</ul>
</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da">binary</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a <a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da" title="explicitly create a binary array (without subtype)">binary</a> <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a5d8fbc60f29db1c02fa8ce0828fcdc1d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d8fbc60f29db1c02fa8ce0828fcdc1d">&#9670;&nbsp;</a></span>parse_event_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1a">nlohmann::basic_json::parse_event_t</a> = <a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1a">detail::parse_event_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>parser event types </p>
<p>The parser callback distinguishes the following events:</p><ul>
<li><code>object_start</code>: the parser read <code>{</code> and started to process a JSON object</li>
<li><code>key</code>: the parser read a key of a value in an object</li>
<li><code>object_end</code>: the parser read <code>}</code> and finished processing a JSON object</li>
<li><code>array_start</code>: the parser read <code>[</code> and started to process a JSON array</li>
<li><code>array_end</code>: the parser read <code>]</code> and finished processing a JSON array</li>
<li><code>value</code>: the parser finished reading a JSON value</li>
</ul>
<div class="image">
<img src="callback_events.png" alt=""/>
<div class="caption">
Example when certain parse events are triggered</div></div>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> for more information and examples </dd></dl>
</div>
</div>
<a id="a87cd77e74fd386d93f26ad04bd01b6a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87cd77e74fd386d93f26ad04bd01b6a5">&#9670;&nbsp;</a></span>parser_callback_t</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">using <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">nlohmann::basic_json::parser_callback_t</a> = detail::parser_callback_t&lt;<a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&gt;</td>
</tr>
</table>
</div><div class="memdoc">
<p>per-element parser callback type </p>
<p>With a parser callback function, the result of parsing a JSON text can be influenced. When passed to <a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee">parse</a>, it is called on certain events (passed as <a class="el" href="classnlohmann_1_1basic__json.html#a5d8fbc60f29db1c02fa8ce0828fcdc1d">parse_event_t</a> via parameter <em>event</em>) with a set recursion depth <em>depth</em> and context JSON value <em>parsed</em>. The return value of the callback function is a boolean indicating whether the element that emitted the callback shall be kept or not.</p>
<p>We distinguish six scenarios (determined by the event type) in which the callback function can be called. The following table describes the values of the parameters <em>depth</em>, <em>event</em>, and <em>parsed</em>.</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">parameter <em>event</em> </th><th class="markdownTableHeadNone">description </th><th class="markdownTableHeadNone">parameter <em>depth</em> </th><th class="markdownTableHeadNone">parameter <em>parsed</em> </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">parse_event_t::object_start </td><td class="markdownTableBodyNone">the parser read <code>{</code> and started to process a JSON object </td><td class="markdownTableBodyNone">depth of the parent of the JSON object </td><td class="markdownTableBodyNone">a JSON value with type discarded </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d" title="the parser read a key of a value in an object">parse_event_t::key</a> </td><td class="markdownTableBodyNone">the parser read a key of a value in an object </td><td class="markdownTableBodyNone">depth of the currently parsed JSON object </td><td class="markdownTableBodyNone">a JSON string containing the key </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">parse_event_t::object_end </td><td class="markdownTableBodyNone">the parser read <code>}</code> and finished processing a JSON object </td><td class="markdownTableBodyNone">depth of the parent of the JSON object </td><td class="markdownTableBodyNone">the parsed JSON object </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">parse_event_t::array_start </td><td class="markdownTableBodyNone">the parser read <code>[</code> and started to process a JSON array </td><td class="markdownTableBodyNone">depth of the parent of the JSON array </td><td class="markdownTableBodyNone">a JSON value with type discarded </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">parse_event_t::array_end </td><td class="markdownTableBodyNone">the parser read <code>]</code> and finished processing a JSON array </td><td class="markdownTableBodyNone">depth of the parent of the JSON array </td><td class="markdownTableBodyNone">the parsed JSON array </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa2063c1608d6e0baf80249c42e2be5804" title="the parser finished reading a JSON value">parse_event_t::value</a> </td><td class="markdownTableBodyNone">the parser finished reading a JSON value </td><td class="markdownTableBodyNone">depth of the value </td><td class="markdownTableBodyNone">the parsed JSON value </td></tr>
</table>
<div class="image">
<img src="callback_events.png" alt=""/>
<div class="caption">
Example when certain parse events are triggered</div></div>
<p>Discarding a value (i.e., returning <code>false</code>) has different effects depending on the context in which function was called:</p>
<ul>
<li>Discarded values in structured types are skipped. That is, the parser will behave as if the discarded value was never read.</li>
<li>In case a value outside a structured type is skipped, it is replaced with <code>null</code>. This case happens if the top-level element is skipped.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">depth</td><td>the depth of the recursion during parsing</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>an event of type parse_event_t indicating the context in the callback function has been called</td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">parsed</td><td>the current intermediate parse result; note that writing to this value has no effect for <a class="el" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d" title="the parser read a key of a value in an object">parse_event_t::key</a> events</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the JSON value which called the function during parsing should be kept (<code>true</code>) or not (<code>false</code>). In the latter case, it is either skipped completely or replaced by an empty discarded object.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee">parse</a> for examples</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ad886f4baa2efb7ac6b0ca70dc72f3d18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad886f4baa2efb7ac6b0ca70dc72f3d18">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[1/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a>&#160;</td>
<td class="paramname"><em>v</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create an empty value with a given type </p>
<p>Create an empty JSON value with a given type. The value will be default initialized with an empty value which depends on the type:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">initial value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>""</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>0</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><code>{}</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><code>[]</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">empty array </td></tr>
</table>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">v</td><td>the type of the value to create</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The following code shows the constructor for different value_t values,basic_json__value_t}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a680c6cbaca83984fd7a5dd7496f86594">clear()</a> &ndash; restores the postcondition of this constructor</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a9126e2860908bc6aa34da0063863070e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9126e2860908bc6aa34da0063863070e">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[2/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">std::nullptr_t&#160;</td>
<td class="paramname"> = <code>nullptr</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a null object </p>
<p>Create a <code>null</code> JSON value. It either takes a null pointer as parameter (explicitly creating <code>null</code>) or no parameter (implicitly creating <code>null</code>). The passed null pointer itself is not read &ndash; it is only used to choose the right constructor.</p>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this constructor never throws exceptions.</p>
<p>@liveexample{The following code shows the constructor with and without a null pointer parameter.,basic_json__nullptr_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a6365d9b23fd9c554d9fc89121c4df4d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6365d9b23fd9c554d9fc89121c4df4d0">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[3/9]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename CompatibleType , typename U = detail::uncvref_t&lt;CompatibleType&gt;, detail::enable_if_t&lt; !detail::is_basic_json&lt; U &gt;::value &amp;&amp;detail::is_compatible_type&lt; basic_json_t, U &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">CompatibleType &amp;&amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a JSON value </p>
<p>This is a "catch all" constructor for all compatible JSON types; that is, types for which a <code>to_json()</code> method exists. The constructor forwards the parameter <em>val</em> to that method (to <code>json_serializer&lt;U&gt;::to_json</code> method with <code>U = uncvref_t&lt;CompatibleType&gt;</code>, to be exact).</p>
<p>Template type <em>CompatibleType</em> includes, but is not limited to, the following types:</p><ul>
<li><b>arrays</b>: <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> and all kinds of compatible containers such as <code>std::vector</code>, <code>std::deque</code>, <code>std::list</code>, <code>std::forward_list</code>, <code>std::array</code>, <code>std::valarray</code>, <code>std::set</code>, <code>std::unordered_set</code>, <code>std::multiset</code>, and <code>std::unordered_multiset</code> with a <code>value_type</code> from which a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> value can be constructed.</li>
<li><b>objects</b>: <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> and all kinds of compatible associative containers such as <code>std::map</code>, <code>std::unordered_map</code>, <code>std::multimap</code>, and <code>std::unordered_multimap</code> with a <code>key_type</code> compatible to <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> and a <code>value_type</code> from which a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> value can be constructed.</li>
<li><b>strings</b>: <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, string literals, and all compatible string containers can be used.</li>
<li><b>numbers</b>: <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>, and all convertible number types such as <code>int</code>, <code>size_t</code>, <code>int64_t</code>, <code>float</code> or <code>double</code> can be used.</li>
<li><b>boolean</b>: <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a> / <code>bool</code> can be used.</li>
<li><b>binary</b>: <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> / <code>std::vector&lt;uint8_t&gt;</code> may be used, unfortunately because string literals cannot be distinguished from binary character arrays by the C++ type system, all types compatible with <code>const char*</code> will be directed to the string constructor instead. This is both for backwards compatibility, and due to the fact that a binary type is not a standard JSON type.</li>
</ul>
<p>See the examples below.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">CompatibleType</td><td>a type such that:<ul>
<li><em>CompatibleType</em> is not derived from <code>std::istream</code>,</li>
<li><em>CompatibleType</em> is not <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> (to avoid hijacking copy/move constructors),</li>
<li><em>CompatibleType</em> is not a different <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type (i.e. with different template arguments)</li>
<li><em>CompatibleType</em> is not a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nested type (e.g., <a class="el" href="classnlohmann_1_1json__pointer.html">json_pointer</a>, <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>, etc ...)</li>
<li>json_serializer<u></u> has a <code>to_json(basic_json_t&amp;, CompatibleType&amp;&amp;)</code> method</li>
</ul>
</td></tr>
<tr><td class="paramname">U</td><td>= <code>uncvref_t&lt;CompatibleType&gt;</code></td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to be forwarded to the respective constructor</td></tr>
</table>
</dd>
</dl>
<p>@complexity Usually linear in the size of the passed <em>val</em>, also depending on the implementation of the called <code>to_json()</code> method.</p>
<p>@exceptionsafety Depends on the called constructor. For types directly supported by the library (i.e., all types for which no <code>to_json()</code> function was provided), strong guarantee holds: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The following code shows the constructor with several compatible types.,basic_json__CompatibleType}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.1.0 </dd></dl>
</div>
</div>
<a id="ad0cf7682c00f137bec6a5a680a80dc6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad0cf7682c00f137bec6a5a680a80dc6e">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[4/9]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BasicJsonType , detail::enable_if_t&lt; detail::is_basic_json&lt; BasicJsonType &gt;::value &amp;&amp;!std::is_same&lt; basic_json, BasicJsonType &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">const BasicJsonType &amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a JSON value from an existing one </p>
<p>This is a constructor for existing <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> types. It does not hijack copy/move constructors, since the parameter has different template arguments than the current ones.</p>
<p>The constructor tries to convert the internal <a class="el" href="classnlohmann_1_1basic__json.html#a19622cd7064559888959fe0ef3882bea">m_value</a> of the parameter.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">BasicJsonType</td><td>a type such that:<ul>
<li><em>BasicJsonType</em> is a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type.</li>
<li><em>BasicJsonType</em> has different template arguments than <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a>.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> value to be converted.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Usually linear in the size of the passed <em>val</em>, also depending on the implementation of the called <code>to_json()</code> method.</p>
<p>@exceptionsafety Depends on the called constructor. For types directly supported by the library (i.e., all types for which no <code>to_json()</code> function was provided), strong guarantee holds: if an exception is thrown, there are no changes to any JSON value.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.2.0 </dd></dl>
</div>
</div>
<a id="a6b3135f51d4e240e541af2f9d0b16ad9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6b3135f51d4e240e541af2f9d0b16ad9">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[5/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>init</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>type_deduction</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a>&#160;</td>
<td class="paramname"><em>manual_type</em> = <code><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985af1f713c9e000f5d3f280adbd124df4f5">value_t::array</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a container (array or object) from an initializer list </p>
<p>Creates a JSON value of type array or object from the passed initializer list <em>init</em>. In case <em>type_deduction</em> is <code>true</code> (default), the type of the JSON value to be created is deducted from the initializer list <em>init</em> according to the following rules:</p>
<ol type="1">
<li>If the list is empty, an empty JSON object value <code>{}</code> is created.</li>
<li>If the list consists of pairs whose first element is a string, a JSON object value is created where the first elements of the pairs are treated as keys and the second elements are as values.</li>
<li>In all other cases, an array is created.</li>
</ol>
<p>The rules aim to create the best fit between a C++ initializer list and JSON values. The rationale is as follows:</p>
<ol type="1">
<li>The empty initializer list is written as <code>{}</code> which is exactly an empty JSON object.</li>
<li>C++ has no way of describing mapped types other than to list a list of pairs. As JSON requires that keys must be of type string, rule 2 is the weakest constraint one can pose on initializer lists to interpret them as an object.</li>
<li>In all other cases, the initializer list could not be interpreted as JSON object type, so interpreting it as JSON array type is safe.</li>
</ol>
<p>With the rules described above, the following JSON values cannot be expressed by an initializer list:</p>
<ul>
<li>the empty array (<code>[]</code>): use <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a> with an empty initializer list in this case</li>
<li>arrays whose elements satisfy rule 2: use <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a> with the same initializer list in this case</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>When used without parentheses around an empty initializer list, <a class="el" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json()</a> is called instead of this function, yielding the JSON null value.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>initializer list with JSON values</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">type_deduction</td><td>internal parameter; when set to <code>true</code>, the type of the JSON value is deducted from the initializer list <em>init</em>; when set to <code>false</code>, the type provided via <em>manual_type</em> is forced. This mode is used by the functions <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a> and <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">object(initializer_list_t)</a>.</td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">manual_type</td><td>internal parameter; when <em>type_deduction</em> is set to <code>false</code>, the created JSON value will use the provided type (only <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985af1f713c9e000f5d3f280adbd124df4f5">value_t::array</a> and <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985aa8cfde6331bd59eb2ac96f8911c4b666">value_t::object</a> are valid); when <em>type_deduction</em> is set to <code>true</code>, this parameter has no effect</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.301</td><td>if <em>type_deduction</em> is <code>false</code>, <em>manual_type</em> is <code><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985aa8cfde6331bd59eb2ac96f8911c4b666" title="object (unordered set of name/value pairs)">value_t::object</a></code>, but <em>init</em> contains an element which is not a pair whose first element is a string. In this case, the constructor could not create an object. If <em>type_deduction</em> would have be <code>true</code>, an array would have been created. See <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">object(initializer_list_t)</a> for an example.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the initializer list <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The example below shows how JSON values are created from initializer lists.,basic_json__list_init_t}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">object(initializer_list_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aacff7cb1f9097fcb1f8f97d401220ac0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacff7cb1f9097fcb1f8f97d401220ac0">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[6/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>cnt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct an array with count copies of given value </p>
<p>Constructs a JSON array value by creating <em>cnt</em> copies of a passed value. In case <em>cnt</em> is <code>0</code>, an empty array is created.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>the number of JSON copies of <em>val</em> to create </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the JSON value to copy</td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd><code>std::distance(<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a>,<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a>) == cnt</code> holds.</dd></dl>
<p>@complexity Linear in <em>cnt</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The following code shows examples for the <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>(size_type\, const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;) constructor.,basic_json__size_type_basic_json}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a3fb693444043639e08ff7be62410b137"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3fb693444043639e08ff7be62410b137">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[7/9]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class InputIT , typename std::enable_if&lt; std::is_same&lt; InputIT, typename basic_json_t::iterator &gt;::value||std::is_same&lt; InputIT, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">InputIT&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">InputIT&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>construct a JSON container given an iterator range </p>
<p>Constructs the JSON value with the contents of the range <code>[first, last)</code>. The semantics depends on the different types a JSON value can have:</p><ul>
<li>In case of a null type, invalid_iterator.206 is thrown.</li>
<li>In case of other primitive types (number, boolean, or string), <em>first</em> must be <code><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code> and <em>last</em> must be <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>. In this case, the value is copied. Otherwise, invalid_iterator.204 is thrown.</li>
<li>In case of structured types (array, object), the constructor behaves as similar versions for <code>std::vector</code> or <code>std::map</code>; that is, a JSON array or object is constructed from the values in the range.</li>
</ul>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">InputIT</td><td>an input iterator type (<a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> or <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>)</td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>begin of the range to copy from (included) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>end of the range to copy from (excluded)</td></tr>
</table>
</dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>Iterators <em>first</em> and <em>last</em> must be initialized. <b>This precondition is enforced with an assertion (see warning).</b> If assertions are switched off, a violation of this precondition yields undefined behavior.</dd>
<dd>
Range <code>[first, last)</code> is valid. Usually, this precondition cannot be checked efficiently. Only certain edge cases are detected; see the description of the exceptions below. A violation of this precondition yields undefined behavior.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>A precondition is enforced with a runtime assertion that will result in calling <code>std::abort</code> if this precondition is not met. Assertions can be disabled by defining <code>NDEBUG</code> at compile time. See <a href="https://en.cppreference.com/w/cpp/error/assert">https://en.cppreference.com/w/cpp/error/assert</a> for more information.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">invalid_iterator.201</td><td>if iterators <em>first</em> and <em>last</em> are not compatible (i.e., do not belong to the same JSON value). In this case, the range <code>[first, last)</code> is undefined. </td></tr>
<tr><td class="paramname">invalid_iterator.204</td><td>if iterators <em>first</em> and <em>last</em> belong to a primitive type (number, boolean, or string), but <em>first</em> does not point to the first element any more. In this case, the range <code>[first, last)</code> is undefined. See example code below. </td></tr>
<tr><td class="paramname">invalid_iterator.206</td><td>if iterators <em>first</em> and <em>last</em> belong to a null value. In this case, the range <code>[first, last)</code> is undefined.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in distance between <em>first</em> and <em>last</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The example below shows several ways to create JSON values by specifying a subrange with iterators.,basic_json__InputIt_InputIt}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="af21eb13ca205fb51e267e6f7ee269229"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af21eb13ca205fb51e267e6f7ee269229">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[8/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>copy constructor </p>
<p>Creates a copy of a given JSON value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>the JSON value to copy</td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd><code>*this == other</code></dd></dl>
<p>@complexity Linear in the size of <em>other</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is linear.</li>
<li>As postcondition, it holds: <code>other == basic_json(other)</code>.</li>
</ul>
<p>@liveexample{The following code shows an example for the copy constructor.,basic_json__basic_json}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a758a9350d03d6eb90a9cb0bf4653d286"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a758a9350d03d6eb90a9cb0bf4653d286">&#9670;&nbsp;</a></span>basic_json() <span class="overload">[9/9]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::basic_json </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>move constructor </p>
<p>Move constructor. Constructs a JSON value with the contents of the given value <em>other</em> using move semantics. It "steals" the resources from <em>other</em> and leaves it as JSON null value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>value to move to this object</td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd><code>*this</code> has the same value as <em>other</em> before the call. </dd>
<dd>
<em>other</em> is a JSON null value.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this constructor never throws exceptions.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/MoveConstructible">MoveConstructible</a> requirements.</p>
<p>@liveexample{The code below shows the move constructor explicitly called via std::move.,basic_json__moveconstructor}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a7d35fcb7c72f755a30ae433e58083eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d35fcb7c72f755a30ae433e58083eca">&#9670;&nbsp;</a></span>~basic_json()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">nlohmann::basic_json::~basic_json </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>destructor </p>
<p>Destroys the JSON value and frees all allocated memory.</p>
<p>@complexity Linear.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is linear.</li>
<li>All stored elements are destroyed and all memory is freed.</li>
</ul>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a651af45dd9d619a3e7524a95388ddb33"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a651af45dd9d619a3e7524a95388ddb33">&#9670;&nbsp;</a></span>meta()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::meta </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns version information on the library </p>
<p>This function returns a JSON object with information about the library, including the version number and information on the platform and compiler.</p>
<dl class="section return"><dt>Returns</dt><dd>JSON object holding version information <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">key </th><th class="markdownTableHeadNone">description </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>compiler</code> </td><td class="markdownTableBodyNone">Information on the used compiler. It is an object with the following keys: <code>c++</code> (the used C++ standard), <code>family</code> (the compiler family; possible values are <code>clang</code>, <code>icc</code>, <code>gcc</code>, <code>ilecpp</code>, <code>msvc</code>, <code>pgcpp</code>, <code>sunpro</code>, and <code>unknown</code>), and <code>version</code> (the compiler version). </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>copyright</code> </td><td class="markdownTableBodyNone">The copyright line for the library as string. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>name</code> </td><td class="markdownTableBodyNone">The name of the library as string. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>platform</code> </td><td class="markdownTableBodyNone">The used platform as string. Possible values are <code>win32</code>, <code>linux</code>, <code>apple</code>, <code>unix</code>, and <code>unknown</code>. </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone"><code>url</code> </td><td class="markdownTableBodyNone">The URL of the project as string. </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone"><code>version</code> </td><td class="markdownTableBodyNone">The version of the library. It is an object with the following keys: <code>major</code>, <code>minor</code>, and <code>patch</code> as defined by <a href="http://semver.org">Semantic Versioning</a>, and <code>string</code> (the version string). </td></tr>
</table>
</dd></dl>
<p>@liveexample{The following code shows an example output of the <code><a class="el" href="classnlohmann_1_1basic__json.html#a651af45dd9d619a3e7524a95388ddb33" title="returns version information on the library">meta()</a></code> function.,meta}</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>2.1.0 </dd></dl>
</div>
</div>
<a id="aebf93a806247231640c785fbc6985d10"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebf93a806247231640c785fbc6985d10">&#9670;&nbsp;</a></span>assert_invariant()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::assert_invariant </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">private</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>checks the class invariants </p>
<p>This function asserts the class invariants. It needs to be called at the end of every constructor to make sure that created objects respect the invariant. Furthermore, it has to be called each time the type of a JSON value is changed, because the invariant expresses a relationship between <em>m_type</em> and <em>m_value</em>. </p>
</div>
</div>
<a id="ab7158658c13c1994c3a1f372f14b22da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7158658c13c1994c3a1f372f14b22da">&#9670;&nbsp;</a></span>binary() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::binary </td>
<td>(</td>
<td class="paramtype">const typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&#160;</td>
<td class="paramname"><em>init</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create a binary array (without subtype) </p>
<p>Creates a JSON binary array value from a given binary container. Binary values are part of various binary formats, such as CBOR, MessagePack, and BSON. This constructor is used to create a value for serialization to those formats.</p>
<dl class="section note"><dt>Note</dt><dd>Note, this function exists because of the difficulty in correctly specifying the correct template overload in the standard value ctor, as both JSON arrays and JSON binary arrays are backed with some form of a <code>std::vector</code>. Because JSON binary arrays are a non-standard extension it was decided that it would be best to prevent automatic initialization of a binary array type, for backwards compatibility and so it does not happen on accident.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>container containing bytes to use as binary type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON binary array value</dd></dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="af5a4db4fa614a68f5a99ff0eadc059d4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af5a4db4fa614a68f5a99ff0eadc059d4">&#9670;&nbsp;</a></span>binary() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::binary </td>
<td>(</td>
<td class="paramtype">const typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&#160;</td>
<td class="paramname"><em>init</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uint8_t&#160;</td>
<td class="paramname"><em>subtype</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create a binary array (with subtype) </p>
<p>Creates a JSON binary array value from a given binary container. Binary values are part of various binary formats, such as CBOR, MessagePack, and BSON. This constructor is used to create a value for serialization to those formats.</p>
<dl class="section note"><dt>Note</dt><dd>Note, this function exists because of the difficulty in correctly specifying the correct template overload in the standard value ctor, as both JSON arrays and JSON binary arrays are backed with some form of a <code>std::vector</code>. Because JSON binary arrays are a non-standard extension it was decided that it would be best to prevent automatic initialization of a binary array type, for backwards compatibility and so it does not happen on accident.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>container containing bytes to use as binary type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">subtype</td><td>subtype to use in MessagePack and BSON</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON binary array value</dd></dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a82351bc959539638a4066fbb31249736"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82351bc959539638a4066fbb31249736">&#9670;&nbsp;</a></span>binary() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::binary </td>
<td>(</td>
<td class="paramtype">typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>init</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create a binary array (without subtype) </p>
<p>Creates a JSON binary array value from a given binary container. Binary values are part of various binary formats, such as CBOR, MessagePack, and BSON. This constructor is used to create a value for serialization to those formats.</p>
<dl class="section note"><dt>Note</dt><dd>Note, this function exists because of the difficulty in correctly specifying the correct template overload in the standard value ctor, as both JSON arrays and JSON binary arrays are backed with some form of a <code>std::vector</code>. Because JSON binary arrays are a non-standard extension it was decided that it would be best to prevent automatic initialization of a binary array type, for backwards compatibility and so it does not happen on accident.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>container containing bytes to use as binary type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON binary array value</dd></dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="acde0d3501daee16863f626cc90b3a098"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acde0d3501daee16863f626cc90b3a098">&#9670;&nbsp;</a></span>binary() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::binary </td>
<td>(</td>
<td class="paramtype">typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>init</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::uint8_t&#160;</td>
<td class="paramname"><em>subtype</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create a binary array (with subtype) </p>
<p>Creates a JSON binary array value from a given binary container. Binary values are part of various binary formats, such as CBOR, MessagePack, and BSON. This constructor is used to create a value for serialization to those formats.</p>
<dl class="section note"><dt>Note</dt><dd>Note, this function exists because of the difficulty in correctly specifying the correct template overload in the standard value ctor, as both JSON arrays and JSON binary arrays are backed with some form of a <code>std::vector</code>. Because JSON binary arrays are a non-standard extension it was decided that it would be best to prevent automatic initialization of a binary array type, for backwards compatibility and so it does not happen on accident.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>container containing bytes to use as binary type </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">subtype</td><td>subtype to use in MessagePack and BSON</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON binary array value</dd></dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="aea7fc2a66a785e2f68535f63b54150a9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aea7fc2a66a785e2f68535f63b54150a9">&#9670;&nbsp;</a></span>array()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::array </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>init</em> = <code>{}</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create an array from an initializer list </p>
<p>Creates a JSON array value from a given initializer list. That is, given a list of values <code>a, b, c</code>, creates the JSON value <code>[a, b, c]</code>. If the initializer list is empty, the empty array <code>[]</code> is created.</p>
<dl class="section note"><dt>Note</dt><dd>This function is only needed to express two edge cases that cannot be realized with the initializer list constructor (<a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json(initializer_list_t, bool, value_t)</a>). These cases are:<ol type="1">
<li>creating an array whose elements are all pairs whose first element is a string &ndash; in this case, the initializer list constructor would create an object, taking the first elements as keys</li>
<li>creating an empty array &ndash; passing the empty initializer list to the initializer list constructor yields an empty object</li>
</ol>
</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>initializer list with JSON values to create an array from (optional)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON array value</dd></dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The following code shows an example for the <code>array</code> function.,array}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json(initializer_list_t, bool, value_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709">object(initializer_list_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a10c8164cc94feabf095b959633c0d709"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a10c8164cc94feabf095b959633c0d709">&#9670;&nbsp;</a></span>object()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::object </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>init</em> = <code>{}</code></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>explicitly create an object from an initializer list </p>
<p>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 <code>{}</code> is created.</p>
<dl class="section note"><dt>Note</dt><dd>This function is only added for symmetry reasons. In contrast to the related function <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a>, there are no cases which can only be expressed by this function. That is, any initializer list <em>init</em> can also be passed to the initializer list constructor <a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json(initializer_list_t, bool, value_t)</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>initializer list to create an object from (optional)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>JSON object value</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.301</td><td>if <em>init</em> is not a list of pairs whose first elements are strings. In this case, no object can be created. When such a value is passed to <a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json(initializer_list_t, bool, value_t)</a>, an array would have been created from the passed initializer list <em>init</em>. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of <em>init</em>.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes to any JSON value.</p>
<p>@liveexample{The following code shows an example for the <code>object</code> function.,object}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a6b3135f51d4e240e541af2f9d0b16ad9">basic_json(initializer_list_t, bool, value_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9">array(initializer_list_t)</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> from an initializer list</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aa39eda8a41872fe4b022855e27fac90d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa39eda8a41872fe4b022855e27fac90d">&#9670;&nbsp;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&amp; nlohmann::basic_json::operator= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>copy assignment </p>
<p>Copy assignment operator. Copies a JSON value via the "copy and swap" strategy: It is expressed in terms of the copy constructor, destructor, and the <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code> member function.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">other</td><td>value to copy from</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is linear.</li>
</ul>
<p>@liveexample{The code below shows and example for the copy assignment. It creates a copy of value <code>a</code> which is then swapped with <code>b</code>. Finally\, the copy of <code>a</code> (which is the null value after the swap) is destroyed.,basic_json__copyassignment}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="acfc564f36da667b7d9109879d34dc36c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfc564f36da667b7d9109879d34dc36c">&#9670;&nbsp;</a></span>dump()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> nlohmann::basic_json::dump </td>
<td>(</td>
<td class="paramtype">const int&#160;</td>
<td class="paramname"><em>indent</em> = <code>-1</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char&#160;</td>
<td class="paramname"><em>indent_char</em> = <code>'&#160;'</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ensure_ascii</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacenlohmann_1_1detail.html#a5a76b60b26dc8c47256a996d18d967df">error_handler_t</a>&#160;</td>
<td class="paramname"><em>error_handler</em> = <code>error_handler_t::strict</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>serialization </p>
<p>Serialization function for JSON values. The function tries to mimic Python's <code>json.dumps()</code> function, and currently supports its <em>indent</em> and <em>ensure_ascii</em> parameters.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">indent</td><td>If indent is nonnegative, then array elements and object members will be pretty-printed with that indent level. An indent level of <code>0</code> will only insert newlines. <code>-1</code> (the default) selects the most compact representation. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">indent_char</td><td>The character to use for indentation if <em>indent</em> is greater than <code>0</code>. The default is (space). </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ensure_ascii</td><td>If <em>ensure_ascii</em> is true, all non-ASCII characters in the output are escaped with <code>\uXXXX</code> sequences, and the result consists of ASCII characters only. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">error_handler</td><td>how to react on decoding errors; there are three possible values: <code>strict</code> (throws and exception in case a decoding error occurs; default), <code>replace</code> (replace invalid UTF-8 sequences with U+FFFD), and <code>ignore</code> (ignore invalid UTF-8 sequences during serialization; all bytes are copied to the output unchanged).</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>string containing the serialization of the JSON value</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.316</td><td>if a string stored inside the JSON value is not UTF-8 encoded and <em>error_handler</em> is set to strict</td></tr>
</table>
</dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Binary values are serialized as object containing two keys:<ul>
<li>"bytes": an array of bytes as integers</li>
<li>"subtype": the subtype as integer or "null" if the binary has no subtype</li>
</ul>
</dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@liveexample{The following example shows the effect of different <em>indent\</em>, <em>indent_char\</em>, and <em>ensure_ascii</em> parameters to the result of the serialization.,dump}</p>
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.python.org/2/library/json.html#json.dump">https://docs.python.org/2/library/json.html#json.dump</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0; indentation character <em>indent_char</em>, option <em>ensure_ascii</em> and exceptions added in version 3.0.0; error handlers added in version 3.4.0; serialization of binary values added in version 3.8.0. </dd></dl>
</div>
</div>
<a id="a530ad60b7fb590e0ee45b6803144cc00"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a530ad60b7fb590e0ee45b6803144cc00">&#9670;&nbsp;</a></span>type()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> nlohmann::basic_json::type </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return the type of the JSON value (explicit) </p>
<p>Return the type of the JSON value as a value from the value_t enumeration.</p>
<dl class="section return"><dt>Returns</dt><dd>the type of the JSON value <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">return value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a37a6259cc0c1dae299a7866489dff0bd" title="null value">value_t::null</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a84e2c64f38f78ba3ea5c905ab5a2da27" title="boolean value">value_t::boolean</a> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ab45cffe084dd3d20d928bee85e7b0f21" title="string value">value_t::string</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number (integer) </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a5763da164f8659d94a56e29df64b4bcc" title="number value (signed integer)">value_t::number_integer</a> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number (unsigned integer) </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985adce7cc8ec29055c4158828921f2f265e" title="number value (unsigned integer)">value_t::number_unsigned</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number (floating-point) </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef" title="number value (floating-point)">value_t::number_float</a> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985aa8cfde6331bd59eb2ac96f8911c4b666" title="object (unordered set of name/value pairs)">value_t::object</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985af1f713c9e000f5d3f280adbd124df4f5" title="array (ordered collection of values)">value_t::array</a> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a9d7183f16acce70658f686ae7f1a4d20" title="binary array (ordered collection of bytes)">value_t::binary</a> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">discarded </td><td class="markdownTableBodyNone"><a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a> </td></tr>
</table>
</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type()</a></code> for all JSON types.,type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a568197da17e5f7f9889607a2524497c6">operator value_t()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> of the JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> (implicit) </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a0fb9647ea72df0a3099cf6dd7e3f53e9">type_name()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> as string</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a422885c85f603a13c36f8d0ac5d9f278"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a422885c85f603a13c36f8d0ac5d9f278">&#9670;&nbsp;</a></span>is_primitive()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_primitive </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether type is primitive </p>
<p>This function returns true if and only if the JSON type is primitive (string, number, boolean, or null).</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is primitive (string, number, boolean, or null), <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a422885c85f603a13c36f8d0ac5d9f278" title="return whether type is primitive">is_primitive()</a></code> for all JSON types.,is_primitive}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a5a53e5a09d9123bfeed6f664b1334f8c">is_structured()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is structured </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#afe9a6fe72337a174cfb117a2081d2cfc">is_null()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is <code>null</code> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae958b0bc067c82850145299711d8bcd5">is_string()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a string </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a0bd23e6f679145905a78020c07547559">is_boolean()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a boolean </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">is_number()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68">is_binary()</a> &ndash; returns whether JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a <a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da" title="explicitly create a binary array (without subtype)">binary</a> <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a5a53e5a09d9123bfeed6f664b1334f8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a53e5a09d9123bfeed6f664b1334f8c">&#9670;&nbsp;</a></span>is_structured()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_structured </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether type is structured </p>
<p>This function returns true if and only if the JSON type is structured (array or object).</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is structured (array or object), <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a5a53e5a09d9123bfeed6f664b1334f8c" title="return whether type is structured">is_structured()</a></code> for all JSON types.,is_structured}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a422885c85f603a13c36f8d0ac5d9f278">is_primitive()</a> &ndash; returns whether <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is primitive </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a1859e0c783a24df797b758e3fc21b966">is_array()</a> &ndash; returns whether <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae3300a95d3bb4a55cb0e04b9f125e42f">is_object()</a> &ndash; returns whether <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="afe9a6fe72337a174cfb117a2081d2cfc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe9a6fe72337a174cfb117a2081d2cfc">&#9670;&nbsp;</a></span>is_null()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_null </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is null </p>
<p>This function returns true if and only if the JSON value is null.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is null, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#afe9a6fe72337a174cfb117a2081d2cfc" title="return whether value is null">is_null()</a></code> for all JSON types.,is_null}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a0bd23e6f679145905a78020c07547559"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0bd23e6f679145905a78020c07547559">&#9670;&nbsp;</a></span>is_boolean()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_boolean </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is a boolean </p>
<p>This function returns true if and only if the JSON value is a boolean.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is boolean, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a0bd23e6f679145905a78020c07547559" title="return whether value is a boolean">is_boolean()</a></code> for all JSON types.,is_boolean}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a5d5f20be10c6f6d263557def2ac504a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d5f20be10c6f6d263557def2ac504a3">&#9670;&nbsp;</a></span>is_number()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_number </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is a number </p>
<p>This function returns true if and only if the JSON value is a number. This includes both integer (signed and unsigned) and floating-point values.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is number (regardless whether integer, unsigned integer or floating-type), <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3" title="return whether value is a number">is_number()</a></code> for all JSON types.,is_number}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad">is_number_integer()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an integer or unsigned integer number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc">is_number_unsigned()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an unsigned integer number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044">is_number_float()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a floating-point number</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a145005bad4fcab4f8620efec8de019ad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a145005bad4fcab4f8620efec8de019ad">&#9670;&nbsp;</a></span>is_number_integer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_number_integer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is an integer number </p>
<p>This function returns true if and only if the JSON value is a signed or unsigned integer number. This excludes floating-point values.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is an integer or unsigned integer number, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad" title="return whether value is an integer number">is_number_integer()</a></code> for all JSON types.,is_number_integer}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">is_number()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc">is_number_unsigned()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an unsigned integer number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044">is_number_float()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a floating-point number</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ac45bc02fd5f4f136f522844222012adc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac45bc02fd5f4f136f522844222012adc">&#9670;&nbsp;</a></span>is_number_unsigned()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_number_unsigned </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is an unsigned integer number </p>
<p>This function returns true if and only if the JSON value is an unsigned integer number. This excludes floating-point and signed integer values.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is an unsigned integer number, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc" title="return whether value is an unsigned integer number">is_number_unsigned()</a></code> for all JSON types.,is_number_unsigned}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">is_number()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad">is_number_integer()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an integer or unsigned integer number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044">is_number_float()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is a floating-point number</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="a926df0038ca14568f88a92d0caeba044"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a926df0038ca14568f88a92d0caeba044">&#9670;&nbsp;</a></span>is_number_float()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_number_float </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is a floating-point number </p>
<p>This function returns true if and only if the JSON value is a floating-point number. This excludes signed and unsigned integer values.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is a floating-point number, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a926df0038ca14568f88a92d0caeba044" title="return whether value is a floating-point number">is_number_float()</a></code> for all JSON types.,is_number_float}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a5d5f20be10c6f6d263557def2ac504a3">is_number()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a145005bad4fcab4f8620efec8de019ad">is_number_integer()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an integer number </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ac45bc02fd5f4f136f522844222012adc">is_number_unsigned()</a> &ndash; check if <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is an unsigned integer number</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ae3300a95d3bb4a55cb0e04b9f125e42f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3300a95d3bb4a55cb0e04b9f125e42f">&#9670;&nbsp;</a></span>is_object()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_object </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is an object </p>
<p>This function returns true if and only if the JSON value is an object.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is object, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#ae3300a95d3bb4a55cb0e04b9f125e42f" title="return whether value is an object">is_object()</a></code> for all JSON types.,is_object}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a1859e0c783a24df797b758e3fc21b966"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1859e0c783a24df797b758e3fc21b966">&#9670;&nbsp;</a></span>is_array()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_array </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is an array </p>
<p>This function returns true if and only if the JSON value is an array.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is array, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a1859e0c783a24df797b758e3fc21b966" title="return whether value is an array">is_array()</a></code> for all JSON types.,is_array}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ae958b0bc067c82850145299711d8bcd5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae958b0bc067c82850145299711d8bcd5">&#9670;&nbsp;</a></span>is_string()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_string </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is a string </p>
<p>This function returns true if and only if the JSON value is a string.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is string, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#ae958b0bc067c82850145299711d8bcd5" title="return whether value is a string">is_string()</a></code> for all JSON types.,is_string}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="af0623f174dc806b5c17b87a485febf68"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af0623f174dc806b5c17b87a485febf68">&#9670;&nbsp;</a></span>is_binary()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_binary </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is a binary array </p>
<p>This function returns true if and only if the JSON value is a binary array.</p>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is binary array, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68" title="return whether value is a binary array">is_binary()</a></code> for all JSON types.,is_binary}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a4fce66d66c424052b192ba45e08a661d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fce66d66c424052b192ba45e08a661d">&#9670;&nbsp;</a></span>is_discarded()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr bool nlohmann::basic_json::is_discarded </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return whether value is discarded </p>
<p>This function returns true if and only if the JSON value was discarded during parsing with a callback function (see <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a>).</p>
<dl class="section note"><dt>Note</dt><dd>This function will always be <code>false</code> for JSON values after parsing. That is, discarded values can only occur during parsing, but will be removed when inside a structured value or replaced by null in other cases.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><code>true</code> if type is discarded, <code>false</code> otherwise.</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a4fce66d66c424052b192ba45e08a661d" title="return whether value is discarded">is_discarded()</a></code> for all JSON types.,is_discarded}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a568197da17e5f7f9889607a2524497c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a568197da17e5f7f9889607a2524497c6">&#9670;&nbsp;</a></span>operator value_t()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr nlohmann::basic_json::operator <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985">value_t</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return the type of the JSON value (implicit) </p>
<p>Implicitly return the type of the JSON value as a value from the value_t enumeration.</p>
<dl class="section return"><dt>Returns</dt><dd>the type of the JSON value</dd></dl>
<p>@complexity Constant.</p>
<p>@exceptionsafety No-throw guarantee: this member function never throws exceptions.</p>
<p>@liveexample{The following code exemplifies the value_t operator for all JSON types.,operator__value_t}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">type()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> of the JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> (explicit) </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a0fb9647ea72df0a3099cf6dd7e3f53e9">type_name()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> as string</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a3999548d7bbac0fdc30960fe38996d2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3999548d7bbac0fdc30960fe38996d2c">&#9670;&nbsp;</a></span>get_ref_impl()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ReferenceType , typename ThisType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static ReferenceType nlohmann::basic_json::get_ref_impl </td>
<td>(</td>
<td class="paramtype">ThisType &amp;&#160;</td>
<td class="paramname"><em>obj</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">private</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>helper function to implement <a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d" title="get a reference value (implicit)">get_ref()</a> </p>
<p>This function helps to implement <a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d" title="get a reference value (implicit)">get_ref()</a> without code duplication for const and non-const overloads</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ThisType</td><td>will be deduced as <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> or <code>const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code></td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.303</td><td>if ReferenceType does not match underlying value type of the current JSON </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="adc6408fbeaf9545882dc62bc20db7d42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc6408fbeaf9545882dc62bc20db7d42">&#9670;&nbsp;</a></span>get() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BasicJsonType , detail::enable_if_t&lt; std::is_same&lt; typename std::remove_const&lt; BasicJsonType &gt;::type, basic_json_t &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get special-case overload </p>
<p>This overloads avoids a lot of template boilerplate, it can be seen as the identity method</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">BasicJsonType</td><td>== <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a copy of *this</dd></dl>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 2.1.0 </dd></dl>
</div>
</div>
<a id="ad6d521a14fe494fb08bea79cfaaa9b46"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6d521a14fe494fb08bea79cfaaa9b46">&#9670;&nbsp;</a></span>get() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename BasicJsonType , detail::enable_if_t&lt; !std::is_same&lt; BasicJsonType, basic_json &gt;::value &amp;&amp;detail::is_basic_json&lt; BasicJsonType &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">BasicJsonType nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get special-case overload </p>
<p>This overloads converts the current <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> in a different <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> type</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">BasicJsonType</td><td>== <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a copy of *this, converted into </dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">BasicJsonType</td><td>@complexity Depending on the implementation of the called <code>from_json()</code> method.</td></tr>
</table>
</dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 3.2.0 </dd></dl>
</div>
</div>
<a id="a0e3fba99f98f8b7c54b7e657f02162c9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e3fba99f98f8b7c54b7e657f02162c9">&#9670;&nbsp;</a></span>get() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ValueTypeCV , typename ValueType = detail::uncvref_t&lt;ValueTypeCV&gt;, detail::enable_if_t&lt; !detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;detail::has_from_json&lt; basic_json_t, ValueType &gt;::value &amp;&amp;!detail::has_non_default_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ValueType nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a value (explicit) </p>
<p>Explicit type conversion between the JSON value and a compatible value which is <a href="https://en.cppreference.com/w/cpp/named_req/CopyConstructible">CopyConstructible</a> and <a href="https://en.cppreference.com/w/cpp/named_req/DefaultConstructible">DefaultConstructible</a>. The value is converted by calling the json_serializer&lt;ValueType&gt; <code>from_json()</code> method.</p>
<p>The function is equivalent to executing </p><div class="fragment"><div class="line">ValueType ret;</div>
<div class="line">JSONSerializer&lt;ValueType&gt;::from_json(*<span class="keyword">this</span>, ret);</div>
<div class="line"><span class="keywordflow">return</span> ret;</div>
</div><!-- fragment --><p>This overloads is chosen if:</p><ul>
<li><em>ValueType</em> is not <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>,</li>
<li>json_serializer&lt;ValueType&gt; has a <code>from_json()</code> method of the form <code>void from_json(const basic_json&amp;, ValueType&amp;)</code>, and</li>
<li>json_serializer&lt;ValueType&gt; does not have a <code>from_json()</code> method of the form <code>ValueType from_json(const basic_json&amp;)</code></li>
</ul>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueTypeCV</td><td>the provided value type </td></tr>
<tr><td class="paramname">ValueType</td><td>the returned value type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the JSON value, converted to <em>ValueType</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">what</td><td>json_serializer&lt;ValueType&gt; <code>from_json()</code> method throws</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The example below shows several conversions from JSON values to other types. There a few things to note: (1) Floating-point numbers can be converted to integers\, (2) A JSON array can be converted to a standard <code>std::vector&lt;short&gt;</code>\, (3) A JSON object can be converted to C++ associative containers such as <code>std::unordered_map&lt;std::string\, json&gt;</code>.,get__ValueType_const}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.1.0 </dd></dl>
</div>
</div>
<a id="a0ac973fb8b3bf1fb60d1b8df880060c3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ac973fb8b3bf1fb60d1b8df880060c3">&#9670;&nbsp;</a></span>get() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ValueTypeCV , typename ValueType = detail::uncvref_t&lt;ValueTypeCV&gt;, detail::enable_if_t&lt; !std::is_same&lt; basic_json_t, ValueType &gt;::value &amp;&amp;detail::has_non_default_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ValueType nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a value (explicit); special case </p>
<p>Explicit type conversion between the JSON value and a compatible value which is <b>not</b> <a href="https://en.cppreference.com/w/cpp/named_req/CopyConstructible">CopyConstructible</a> and <b>not</b> <a href="https://en.cppreference.com/w/cpp/named_req/DefaultConstructible">DefaultConstructible</a>. The value is converted by calling the json_serializer&lt;ValueType&gt; <code>from_json()</code> method.</p>
<p>The function is equivalent to executing </p><div class="fragment"><div class="line"><span class="keywordflow">return</span> JSONSerializer&lt;ValueTypeCV&gt;::from_json(*<span class="keyword">this</span>);</div>
</div><!-- fragment --><p>This overloads is chosen if:</p><ul>
<li><em>ValueType</em> is not <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> and</li>
<li>json_serializer&lt;ValueType&gt; has a <code>from_json()</code> method of the form <code>ValueType from_json(const basic_json&amp;)</code></li>
</ul>
<dl class="section note"><dt>Note</dt><dd>If json_serializer&lt;ValueType&gt; has both overloads of <code>from_json()</code>, this one is chosen.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueTypeCV</td><td>the provided value type </td></tr>
<tr><td class="paramname">ValueType</td><td>the returned value type</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the JSON value, converted to <em>ValueType</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">what</td><td>json_serializer&lt;ValueType&gt; <code>from_json()</code> method throws</td></tr>
</table>
</dd>
</dl>
<dl class="section since"><dt>Since</dt><dd>version 2.1.0 </dd></dl>
</div>
</div>
<a id="a24f07b19d83414f342b204da5a400363"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24f07b19d83414f342b204da5a400363">&#9670;&nbsp;</a></span>get_to()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ValueType , detail::enable_if_t&lt; !detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;detail::has_from_json&lt; basic_json_t, ValueType &gt;::value, int &gt; = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ValueType&amp; nlohmann::basic_json::get_to </td>
<td>(</td>
<td class="paramtype">ValueType &amp;&#160;</td>
<td class="paramname"><em>v</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a value (explicit) </p>
<p>Explicit type conversion between the JSON value and a compatible value. The value is filled into the input parameter by calling the json_serializer&lt;ValueType&gt; <code>from_json()</code> method.</p>
<p>The function is equivalent to executing </p><div class="fragment"><div class="line">ValueType v;</div>
<div class="line">JSONSerializer&lt;ValueType&gt;::from_json(*<span class="keyword">this</span>, v);</div>
</div><!-- fragment --><p>This overloads is chosen if:</p><ul>
<li><em>ValueType</em> is not <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a>,</li>
<li>json_serializer&lt;ValueType&gt; has a <code>from_json()</code> method of the form <code>void from_json(const basic_json&amp;, ValueType&amp;)</code>, and</li>
</ul>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueType</td><td>the input parameter type.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the input parameter, allowing chaining calls.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">what</td><td>json_serializer&lt;ValueType&gt; <code>from_json()</code> method throws</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The example below shows several conversions from JSON values to other types. There a few things to note: (1) Floating-point numbers can be converted to integers\, (2) A JSON array can be converted to a standard <code>std::vector&lt;short&gt;</code>\, (3) A JSON object can be converted to C++ associative containers such as <code>std::unordered_map&lt;std::string\, json&gt;</code>.,get_to}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.3.0 </dd></dl>
</div>
</div>
<a id="a9e639075f5b3f1733fcb5f04aea3da95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e639075f5b3f1733fcb5f04aea3da95">&#9670;&nbsp;</a></span>get_ptr() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto nlohmann::basic_json::get_ptr </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> -&gt; decltype(std::declval&lt;<a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a>&amp;&gt;().<a class="el" href="classnlohmann_1_1basic__json.html#a364997745e8a4db417d1c1bfd252ee61">get_impl_ptr</a>(std::declval&lt;PointerType&gt;()))
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a pointer value (implicit) </p>
<p>Implicit pointer access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>Writing data to the pointee of the result yields an undefined state.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">PointerType</td><td>pointer type; must be a pointer to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>. Enforced by a static assertion.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the internally stored JSON value if the requested pointer type <em>PointerType</em> fits to the JSON value; <code>nullptr</code> otherwise</dd></dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a <code>nullptr</code> is returned if the value and the requested pointer type does not match.,get_ptr}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="abad0f48fa4535a8820e90509b733f16b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abad0f48fa4535a8820e90509b733f16b">&#9670;&nbsp;</a></span>get_ptr() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value &amp;&amp;std::is_const&lt; typename std::remove_pointer&lt; PointerType &gt;::type &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr auto nlohmann::basic_json::get_ptr </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const -&gt; decltype(std::declval&lt;const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a>&amp;&gt;().<a class="el" href="classnlohmann_1_1basic__json.html#a364997745e8a4db417d1c1bfd252ee61">get_impl_ptr</a>(std::declval&lt;PointerType&gt;()))
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a pointer value (implicit) </p>
<p>get a pointer value (implicit) Implicit pointer access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>Writing data to the pointee of the result yields an undefined state.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">PointerType</td><td>pointer type; must be a pointer to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>. Enforced by a static assertion.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the internally stored JSON value if the requested pointer type <em>PointerType</em> fits to the JSON value; <code>nullptr</code> otherwise</dd></dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a <code>nullptr</code> is returned if the value and the requested pointer type does not match.,get_ptr}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a19e7e8e1811dcbfb35d1855a24abd8aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19e7e8e1811dcbfb35d1855a24abd8aa">&#9670;&nbsp;</a></span>get() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">auto nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> -&gt; decltype(std::declval&lt;<a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a>&amp;&gt;().template <a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr</a>&lt;PointerType&gt;())
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a pointer value (explicit) </p>
<p>Explicit pointer access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>The pointer becomes invalid if the underlying JSON object changes.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">PointerType</td><td>pointer type; must be a pointer to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the internally stored JSON value if the requested pointer type <em>PointerType</em> fits to the JSON value; <code>nullptr</code> otherwise</dd></dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a <code>nullptr</code> is returned if the value and the requested pointer type does not match.,get__PointerType}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr()</a> for explicit pointer-member access</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a37a6d7eaf9d736a890adb6e9f1444fde"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37a6d7eaf9d736a890adb6e9f1444fde">&#9670;&nbsp;</a></span>get() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename PointerType , typename std::enable_if&lt; std::is_pointer&lt; PointerType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">constexpr auto nlohmann::basic_json::get </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const -&gt; decltype(std::declval&lt;const <a class="el" href="classnlohmann_1_1basic__json.html#ae76659f8c2fbeab628a6c618e0817dee">basic_json_t</a>&amp;&gt;().template <a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr</a>&lt;PointerType&gt;())
</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">constexpr</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a pointer value (explicit) </p>
<p>get a pointer value (explicit) Explicit pointer access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>The pointer becomes invalid if the underlying JSON object changes.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">PointerType</td><td>pointer type; must be a pointer to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a440094de5ef4e119b2771b549b33da70">number_unsigned_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>pointer to the internally stored JSON value if the requested pointer type <em>PointerType</em> fits to the JSON value; <code>nullptr</code> otherwise</dd></dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how pointers to internal values of a JSON value can be requested. Note that no type conversions are made and a <code>nullptr</code> is returned if the value and the requested pointer type does not match.,get__PointerType}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a9e639075f5b3f1733fcb5f04aea3da95">get_ptr()</a> for explicit pointer-member access</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a838359d25d318852c8204b999e5f375d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a838359d25d318852c8204b999e5f375d">&#9670;&nbsp;</a></span>get_ref() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ReferenceType , typename std::enable_if&lt; std::is_reference&lt; ReferenceType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ReferenceType nlohmann::basic_json::get_ref </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a reference value (implicit) </p>
<p>Implicit reference access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>Writing data to the referee of the result yields an undefined state.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ReferenceType</td><td>reference type; must be a reference to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>. Enforced by static assertion.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the internally stored JSON value if the requested reference type <em>ReferenceType</em> fits to the JSON value; throws type_error.303 otherwise</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.303</td><td>in case passed type <em>ReferenceType</em> is incompatible with the stored JSON value; see example below</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example shows several calls to <code><a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d" title="get a reference value (implicit)">get_ref()</a></code>.,get_ref}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.1.0 </dd></dl>
</div>
</div>
<a id="a71ff2578d0655d983f2934a907b0f960"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71ff2578d0655d983f2934a907b0f960">&#9670;&nbsp;</a></span>get_ref() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ReferenceType , typename std::enable_if&lt; std::is_reference&lt; ReferenceType &gt;::value &amp;&amp;std::is_const&lt; typename std::remove_reference&lt; ReferenceType &gt;::type &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ReferenceType nlohmann::basic_json::get_ref </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a reference value (implicit) </p>
<p>get a reference value (implicit) Implicit reference access to the internally stored JSON value. No copies are made.</p>
<dl class="section warning"><dt>Warning</dt><dd>Writing data to the referee of the result yields an undefined state.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ReferenceType</td><td>reference type; must be a reference to <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a8cc04e22d7ef18efd2d34bc04eb6a1b2">boolean_t</a>, <a class="el" href="classnlohmann_1_1basic__json.html#ab227d71ad47b6ed6a3acae52dedbb49d">number_integer_t</a>, or <a class="el" href="classnlohmann_1_1basic__json.html#ade1eb06e9fc3ff2ba1efd709b94b401d">number_float_t</a>. Enforced by static assertion.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the internally stored JSON value if the requested reference type <em>ReferenceType</em> fits to the JSON value; throws type_error.303 otherwise</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.303</td><td>in case passed type <em>ReferenceType</em> is incompatible with the stored JSON value; see example below</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example shows several calls to <code><a class="el" href="classnlohmann_1_1basic__json.html#a838359d25d318852c8204b999e5f375d" title="get a reference value (implicit)">get_ref()</a></code>.,get_ref}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.1.0 </dd></dl>
</div>
</div>
<a id="a67625415961aa7a1289d3d08cc404284"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a67625415961aa7a1289d3d08cc404284">&#9670;&nbsp;</a></span>operator ValueType()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ValueType , typename std::enable_if&lt; !std::is_pointer&lt; ValueType &gt;::value &amp;&amp;!std::is_same&lt; ValueType, detail::json_ref&lt; basic_json &gt;&gt;::value &amp;&amp;!std::is_same&lt; ValueType, typename string_t::value_type &gt;::value &amp;&amp;!detail::is_basic_json&lt; ValueType &gt;::value &amp;&amp;!std::is_same&lt; ValueType, std::initializer_list&lt; typename string_t::value_type &gt;&gt;::value &amp;&amp;detail::is_detected&lt; detail::get_template_function, const basic_json_t &amp;, ValueType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">JSON_EXPLICIT nlohmann::basic_json::operator ValueType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>get a value (implicit) </p>
<p>Implicit type conversion between the JSON value and a compatible value. The call is realized by calling <a class="el" href="classnlohmann_1_1basic__json.html#adc6408fbeaf9545882dc62bc20db7d42">get() const</a>.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueType</td><td>non-pointer type compatible to the JSON value, for instance <code>int</code> for JSON integer numbers, <code>bool</code> for JSON booleans, or <code>std::vector</code> types for JSON arrays. The character type of <a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> as well as an initializer list of this type is excluded to avoid ambiguities as these types implicitly convert to <code>std::string</code>.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the JSON value, converted to type <em>ValueType</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>in case passed type <em>ValueType</em> is incompatible to the JSON value type (e.g., the JSON value is of type boolean, but a string is requested); see example below</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the JSON value.</p>
<p>@liveexample{The example below shows several conversions from JSON values to other types. There a few things to note: (1) Floating-point numbers can be converted to integers\, (2) A JSON array can be converted to a standard <code>std::vector&lt;short&gt;</code>\, (3) A JSON object can be converted to C++ associative containers such as <code>std::unordered_map&lt;std::string\, json&gt;</code>.,operator__ValueType}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a76403180c973eb50c39948ed7b931d7d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a76403180c973eb50c39948ed7b931d7d">&#9670;&nbsp;</a></span>get_binary() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a>&amp; nlohmann::basic_json::get_binary </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<dl class="section return"><dt>Returns</dt><dd>reference to the binary value</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>if the value is not binary</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68">is_binary()</a> to check if the <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is <a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da" title="explicitly create a binary array (without subtype)">binary</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a016b2a512369a464f64e14b72885fd76"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a016b2a512369a464f64e14b72885fd76">&#9670;&nbsp;</a></span>get_binary() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const <a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a>&amp; nlohmann::basic_json::get_binary </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
<dl class="section return"><dt>Returns</dt><dd>reference to the binary value</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>if the value is not binary</td></tr>
</table>
</dd>
</dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#af0623f174dc806b5c17b87a485febf68">is_binary()</a> to check if the <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> is <a class="el" href="classnlohmann_1_1basic__json.html#ab7158658c13c1994c3a1f372f14b22da" title="explicitly create a binary array (without subtype)">binary</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a5805a2f5a4f94bdff25423e7ba833ad2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5805a2f5a4f94bdff25423e7ba833ad2">&#9670;&nbsp;</a></span>at() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified array element with bounds checking </p>
<p>Returns a reference to the element at specified location <em>idx</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>index of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element at index <em>idx</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.304</td><td>if the JSON value is not an array; in this case, calling <code>at</code> with an index makes no sense. See example below. </td></tr>
<tr><td class="paramname">out_of_range.401</td><td>if the index <em>idx</em> is out of range of the array; that is, <code>idx &gt;= <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0</dd></dl>
<p>@liveexample{The example below shows how array elements can be read and written using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at()</a></code>. It also demonstrates the different exceptions that can be thrown.,at__size_type} </p>
</div>
</div>
<a id="a2204de84d420ad31b29488641815f90e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2204de84d420ad31b29488641815f90e">&#9670;&nbsp;</a></span>at() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified array element with bounds checking </p>
<p>Returns a const reference to the element at specified location <em>idx</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>index of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element at index <em>idx</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.304</td><td>if the JSON value is not an array; in this case, calling <code>at</code> with an index makes no sense. See example below. </td></tr>
<tr><td class="paramname">out_of_range.401</td><td>if the index <em>idx</em> is out of range of the array; that is, <code>idx &gt;= <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0</dd></dl>
<p>@liveexample{The example below shows how array elements can be read using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at()</a></code>. It also demonstrates the different exceptions that can be thrown., at__size_type_const} </p>
</div>
</div>
<a id="a157868dfcf060bf67fa423bafbf27b57"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a157868dfcf060bf67fa423bafbf27b57">&#9670;&nbsp;</a></span>at() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element with bounds checking </p>
<p>Returns a reference to the element at with specified key <em>key</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element at key <em>key</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.304</td><td>if the JSON value is not an object; in this case, calling <code>at</code> with a key makes no sense. See example below. </td></tr>
<tr><td class="paramname">out_of_range.403</td><td>if the key <em>key</em> is is not stored in the object; that is, <code>find(key) == <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Logarithmic in the size of the container.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp;)</a> for unchecked access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0</dd></dl>
<p>@liveexample{The example below shows how object elements can be read and written using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at()</a></code>. It also demonstrates the different exceptions that can be thrown.,at__object_t_key_type} </p>
</div>
</div>
<a id="a5ca85574718e7fde0a3113775c3023c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ca85574718e7fde0a3113775c3023c8">&#9670;&nbsp;</a></span>at() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element with bounds checking </p>
<p>Returns a const reference to the element at with specified key <em>key</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element at key <em>key</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.304</td><td>if the JSON value is not an object; in this case, calling <code>at</code> with a key makes no sense. See example below. </td></tr>
<tr><td class="paramname">out_of_range.403</td><td>if the key <em>key</em> is is not stored in the object; that is, <code>find(key) == <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Logarithmic in the size of the container.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp;)</a> for unchecked access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0</dd></dl>
<p>@liveexample{The example below shows how object elements can be read using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at()</a></code>. It also demonstrates the different exceptions that can be thrown., at__object_t_key_type_const} </p>
</div>
</div>
<a id="a05c86efa156004b090258c1469eab3fd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05c86efa156004b090258c1469eab3fd">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[1/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified array element </p>
<p>Returns a reference to the element at specified location <em>idx</em>.</p>
<dl class="section note"><dt>Note</dt><dd>If <em>idx</em> is beyond the range of the array (i.e., <code>idx &gt;= <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>), then the array is silently filled up with <code>null</code> values to make <code>idx</code> a valid reference to the last stored element.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>index of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element at index <em>idx</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an array or null; in that cases, using the [] operator with an index makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant if <em>idx</em> is in the range of the array. Otherwise linear in <code>idx - <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>.</p>
<p>@liveexample{The example below shows how array elements can be read and written using <code>[]</code> operator. Note the addition of <code>null</code> values.,operatorarray__size_type}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a9fd9864614513a7191df0bada4880228"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9fd9864614513a7191df0bada4880228">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[2/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified array element </p>
<p>Returns a const reference to the element at specified location <em>idx</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>index of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element at index <em>idx</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an array; in that case, using the [] operator with an index makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how array elements can be read using the <code>[]</code> operator.,operatorarray__size_type_const}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ad983106f7d7fd6a03cf609a9641976f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad983106f7d7fd6a03cf609a9641976f4">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[3/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element </p>
<p>Returns a reference to the element at with specified key <em>key</em>.</p>
<dl class="section note"><dt>Note</dt><dd>If <em>key</em> is not found in the object, then it is silently added to the object and filled with a <code>null</code> value to make <code>key</code> a valid reference. In case the value was <code>null</code> before, it is converted to an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element at key <em>key</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an object or null; in that cases, using the [] operator with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be read and written using the <code>[]</code> operator.,operatorarray__key_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a7630fcfd1eda4d7de237af90466bffc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7630fcfd1eda4d7de237af90466bffc6">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[4/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>read-only access specified object element </p>
<p>Returns a const reference to the element at with specified key <em>key</em>. No bounds checking is performed.</p>
<dl class="section warning"><dt>Warning</dt><dd>If the element with key <em>key</em> does not exist, the behavior is undefined.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element at key <em>key</em> </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The element with key <em>key</em> must exist. <b>This precondition is enforced with an assertion.</b></dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an object; in that case, using the [] operator with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be read using the <code>[]</code> operator.,operatorarray__key_type_const}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a4ef3a5ec711a8e4b32407a261baee850"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ef3a5ec711a8e4b32407a261baee850">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[5/8]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">T *&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element </p>
<p>Returns a reference to the element at with specified key <em>key</em>.</p>
<dl class="section note"><dt>Note</dt><dd>If <em>key</em> is not found in the object, then it is silently added to the object and filled with a <code>null</code> value to make <code>key</code> a valid reference. In case the value was <code>null</code> before, it is converted to an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element at key <em>key</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an object or null; in that cases, using the [] operator with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be read and written using the <code>[]</code> operator.,operatorarray__key_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.1.0 </dd></dl>
</div>
</div>
<a id="aadfe340990ea3f4039f8d3c100f254e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aadfe340990ea3f4039f8d3c100f254e6">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[6/8]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename T &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">T *&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>read-only access specified object element </p>
<p>Returns a const reference to the element at with specified key <em>key</em>. No bounds checking is performed.</p>
<dl class="section warning"><dt>Warning</dt><dd>If the element with key <em>key</em> does not exist, the behavior is undefined.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element at key <em>key</em> </dd></dl>
<dl class="section pre"><dt>Precondition</dt><dd>The element with key <em>key</em> must exist. <b>This precondition is enforced with an assertion.</b></dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.305</td><td>if the JSON value is not an object; in that case, using the [] operator with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be read using the <code>[]</code> operator.,operatorarray__key_type_const}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245">value()</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> with a default <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.1.0 </dd></dl>
</div>
</div>
<a id="ab29a59d20767180d6d2fe4f5054dd245"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab29a59d20767180d6d2fe4f5054dd245">&#9670;&nbsp;</a></span>value() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType , typename std::enable_if&lt; detail::is_getable&lt; basic_json_t, ValueType &gt;::value &amp;&amp;!std::is_same&lt; value_t, ValueType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ValueType nlohmann::basic_json::value </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ValueType &amp;&#160;</td>
<td class="paramname"><em>default_value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element with default value </p>
<p>Returns either a copy of an object's element at the specified key <em>key</em> or a given default value if no element with key <em>key</em> exists.</p>
<p>The function is basically equivalent to executing </p><div class="fragment"><div class="line"><span class="keywordflow">try</span> {</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">at</a>(key);</div>
<div class="line">} <span class="keywordflow">catch</span>(<a class="code" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a>) {</div>
<div class="line"> <span class="keywordflow">return</span> default_value;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Unlike <a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a>, this function does not throw if the given key <em>key</em> was not found.</dd>
<dd>
Unlike <a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp; key)</a>, this function does not implicitly add an element to the position defined by <em>key</em>. This function is furthermore also applicable to const objects.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">default_value</td><td>the value to return if <em>key</em> is not found</td></tr>
</table>
</dd>
</dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueType</td><td>type compatible to JSON values, for instance <code>int</code> for JSON integer numbers, <code>bool</code> for JSON booleans, or <code>std::vector</code> types for JSON arrays. Note the type of the expected value at <em>key</em> and the default value <em>default_value</em> must be compatible.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the element at key <em>key</em> or <em>default_value</em> if <em>key</em> is not found</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>if <em>default_value</em> does not match the type of the value at <em>key</em> </td></tr>
<tr><td class="paramname">type_error.306</td><td>if the JSON value is not an object; in that case, using <code><a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value()</a></code> with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be queried with a default value.,basic_json__value}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp;)</a> for unchecked access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a7a378b9282dd1f7eb9bfffea6d177bbe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a378b9282dd1f7eb9bfffea6d177bbe">&#9670;&nbsp;</a></span>value() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> nlohmann::basic_json::value </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>default_value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>overload for a default value of type const char* </p>
<p>access specified object element with default value Returns either a copy of an object's element at the specified key <em>key</em> or a given default value if no element with key <em>key</em> exists.</p>
<p>The function is basically equivalent to executing </p><div class="fragment"><div class="line"><span class="keywordflow">try</span> {</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">at</a>(key);</div>
<div class="line">} <span class="keywordflow">catch</span>(<a class="code" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a>) {</div>
<div class="line"> <span class="keywordflow">return</span> default_value;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Unlike <a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a>, this function does not throw if the given key <em>key</em> was not found.</dd>
<dd>
Unlike <a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp; key)</a>, this function does not implicitly add an element to the position defined by <em>key</em>. This function is furthermore also applicable to const objects.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key of the element to access </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">default_value</td><td>the value to return if <em>key</em> is not found</td></tr>
</table>
</dd>
</dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueType</td><td>type compatible to JSON values, for instance <code>int</code> for JSON integer numbers, <code>bool</code> for JSON booleans, or <code>std::vector</code> types for JSON arrays. Note the type of the expected value at <em>key</em> and the default value <em>default_value</em> must be compatible.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the element at key <em>key</em> or <em>default_value</em> if <em>key</em> is not found</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>if <em>default_value</em> does not match the type of the value at <em>key</em> </td></tr>
<tr><td class="paramname">type_error.306</td><td>if the JSON value is not an object; in that case, using <code><a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value()</a></code> with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be queried with a default value.,basic_json__value}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a157868dfcf060bf67fa423bafbf27b57">at(const typename object_t::key_type&amp;)</a> for access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a> with range checking </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad983106f7d7fd6a03cf609a9641976f4">operator[](const typename object_t::key_type&amp;)</a> for unchecked access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a23d4ac15d8df59f36967a46a49dd896d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a23d4ac15d8df59f36967a46a49dd896d">&#9670;&nbsp;</a></span>value() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class ValueType , typename std::enable_if&lt; detail::is_getable&lt; basic_json_t, ValueType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">ValueType nlohmann::basic_json::value </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ValueType &amp;&#160;</td>
<td class="paramname"><em>default_value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified object element via JSON Pointer with default value </p>
<p>Returns either a copy of an object's element at the specified key <em>key</em> or a given default value if no element with key <em>key</em> exists.</p>
<p>The function is basically equivalent to executing </p><div class="fragment"><div class="line"><span class="keywordflow">try</span> {</div>
<div class="line"> <span class="keywordflow">return</span> <a class="code" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">at</a>(ptr);</div>
<div class="line">} <span class="keywordflow">catch</span>(<a class="code" href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">out_of_range</a>) {</div>
<div class="line"> <span class="keywordflow">return</span> default_value;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>Unlike <a class="el" href="classnlohmann_1_1basic__json.html#ac07f0518ba7a3af394d37d86753a9845">at(const json_pointer&amp;)</a>, this function does not throw if the given key <em>key</em> was not found.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>a JSON pointer to the element to access </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">default_value</td><td>the value to return if <em>ptr</em> found no value</td></tr>
</table>
</dd>
</dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">ValueType</td><td>type compatible to JSON values, for instance <code>int</code> for JSON integer numbers, <code>bool</code> for JSON booleans, or <code>std::vector</code> types for JSON arrays. Note the type of the expected value at <em>key</em> and the default value <em>default_value</em> must be compatible.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>copy of the element at key <em>key</em> or <em>default_value</em> if <em>key</em> is not found</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.302</td><td>if <em>default_value</em> does not match the type of the value at <em>ptr</em> </td></tr>
<tr><td class="paramname">type_error.306</td><td>if the JSON value is not an object; in that case, using <code><a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value()</a></code> with a key makes no sense.</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container.</p>
<p>@liveexample{The example below shows how object elements can be queried with a default value.,basic_json__value_ptr}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a0d26844b03de9067a47752b138e28236">operator[](const json_pointer&amp;)</a> for unchecked access by <a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831" title="the type of an element reference">reference</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.2 </dd></dl>
</div>
</div>
<a id="a5dfdaa906f429f5f8b6e14db46e94852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5dfdaa906f429f5f8b6e14db46e94852">&#9670;&nbsp;</a></span>value() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> nlohmann::basic_json::value </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&#160;</td>
<td class="paramname"><em>default_value</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>overload for a default value of type const char* </p>
</div>
</div>
<a id="ad1702349b3aeca0e518921336faa570c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad1702349b3aeca0e518921336faa570c">&#9670;&nbsp;</a></span>front() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::front </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access the first element </p>
<p>Returns a reference to the first element in the container. For a JSON container <code>c</code>, the expression <code>c.front()</code> is equivalent to <code>*c.<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>.</p>
<dl class="section return"><dt>Returns</dt><dd>In case of a structured type (array or object), a reference to the first element is returned. In case of number, string, boolean, or binary values, a reference to the value is returned.</dd></dl>
<p>@complexity Constant.</p>
<dl class="section pre"><dt>Precondition</dt><dd>The JSON value must not be <code>null</code> (would throw <code>std::out_of_range</code>) or an empty array or object (undefined behavior, <b>guarded by assertions</b>). </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>The JSON value remains unchanged.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">invalid_iterator.214</td><td>when called on <code>null</code> value</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c" title="access the first element">front()</a></code>.,front}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830">back()</a> &ndash; access the last element</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a135d1239f3189866baaede36ec0701c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a135d1239f3189866baaede36ec0701c8">&#9670;&nbsp;</a></span>front() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::front </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access the first element </p>
<p>Returns a reference to the first element in the container. For a JSON container <code>c</code>, the expression <code>c.front()</code> is equivalent to <code>*c.<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>.</p>
<dl class="section return"><dt>Returns</dt><dd>In case of a structured type (array or object), a reference to the first element is returned. In case of number, string, boolean, or binary values, a reference to the value is returned.</dd></dl>
<p>@complexity Constant.</p>
<dl class="section pre"><dt>Precondition</dt><dd>The JSON value must not be <code>null</code> (would throw <code>std::out_of_range</code>) or an empty array or object (undefined behavior, <b>guarded by assertions</b>). </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>The JSON value remains unchanged.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">invalid_iterator.214</td><td>when called on <code>null</code> value</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c" title="access the first element">front()</a></code>.,front}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830">back()</a> &ndash; access the last element</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ab87589ef6b14a6e6881109e04d414830"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab87589ef6b14a6e6881109e04d414830">&#9670;&nbsp;</a></span>back() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::back </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access the last element </p>
<p>Returns a reference to the last element in the container. For a JSON container <code>c</code>, the expression <code>c.back()</code> is equivalent to </p><div class="fragment"><div class="line"><span class="keyword">auto</span> tmp = c.end();</div>
<div class="line">--tmp;</div>
<div class="line"><span class="keywordflow">return</span> *tmp;</div>
</div><!-- fragment --><dl class="section return"><dt>Returns</dt><dd>In case of a structured type (array or object), a reference to the last element is returned. In case of number, string, boolean, or binary values, a reference to the value is returned.</dd></dl>
<p>@complexity Constant.</p>
<dl class="section pre"><dt>Precondition</dt><dd>The JSON value must not be <code>null</code> (would throw <code>std::out_of_range</code>) or an empty array or object (undefined behavior, <b>guarded by assertions</b>). </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>The JSON value remains unchanged.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">invalid_iterator.214</td><td>when called on a <code>null</code> value. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830" title="access the last element">back()</a></code>.,back}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c">front()</a> &ndash; access the first element</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a3b1077520ab6c8682a9039fcc2a50b5d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b1077520ab6c8682a9039fcc2a50b5d">&#9670;&nbsp;</a></span>back() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::back </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access the last element </p>
<p>Returns a reference to the last element in the container. For a JSON container <code>c</code>, the expression <code>c.back()</code> is equivalent to </p><div class="fragment"><div class="line"><span class="keyword">auto</span> tmp = c.end();</div>
<div class="line">--tmp;</div>
<div class="line"><span class="keywordflow">return</span> *tmp;</div>
</div><!-- fragment --><dl class="section return"><dt>Returns</dt><dd>In case of a structured type (array or object), a reference to the last element is returned. In case of number, string, boolean, or binary values, a reference to the value is returned.</dd></dl>
<p>@complexity Constant.</p>
<dl class="section pre"><dt>Precondition</dt><dd>The JSON value must not be <code>null</code> (would throw <code>std::out_of_range</code>) or an empty array or object (undefined behavior, <b>guarded by assertions</b>). </dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>The JSON value remains unchanged.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">invalid_iterator.214</td><td>when called on a <code>null</code> value. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ab87589ef6b14a6e6881109e04d414830" title="access the last element">back()</a></code>.,back}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ad1702349b3aeca0e518921336faa570c">front()</a> &ndash; access the first element</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a0d0f5fb6f22126f7e3803dd7cdf7030f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d0f5fb6f22126f7e3803dd7cdf7030f">&#9670;&nbsp;</a></span>erase() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class IteratorType , typename std::enable_if&lt; std::is_same&lt; IteratorType, typename basic_json_t::iterator &gt;::value||std::is_same&lt; IteratorType, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">IteratorType nlohmann::basic_json::erase </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>pos</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>remove element given an iterator </p>
<p>Removes the element specified by iterator <em>pos</em>. The iterator <em>pos</em> must be valid and dereferenceable. Thus the <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code> iterator (which is valid, but is not dereferenceable) cannot be used as a value for <em>pos</em>.</p>
<p>If called on a primitive type other than <code>null</code>, the resulting JSON value will be <code>null</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator to the element to remove </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Iterator following the last removed element. If the iterator <em>pos</em> refers to the last element, the <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code> iterator is returned.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">IteratorType</td><td>an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> or <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a></td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>Invalidates iterators and references at or after the point of the erase, including the <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code> iterator.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.307</td><td>if called on a <code>null</code> value; example: <code>"cannot use
erase() with null"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if called on an iterator which does not belong to the current JSON value; example: <code>"iterator does not fit current
value"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.205</td><td>if called on a primitive type with invalid iterator (i.e., any iterator which is not <code><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>); example: <code>"iterator
out of range"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity The complexity depends on the type:</p><ul>
<li>objects: amortized constant</li>
<li>arrays: linear in distance between <em>pos</em> and the end of the container</li>
<li>strings and binary: linear in the length of the member</li>
<li>other types: constant</li>
</ul>
<p>@liveexample{The example shows the result of <code><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f" title="remove element given an iterator">erase()</a></code> for different JSON types.,erase__IteratorType}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">erase(IteratorType, IteratorType)</a> &ndash; removes the elements in the given range </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a022404d92eb877a7ad5bfce198ef067a">erase(const typename object_t::key_type&amp;)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given key </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a49a7ac46583c77094f96a7717597ff5f">erase(const size_type)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given index</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a24c397c38ce6984594a87c64b2378dc9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24c397c38ce6984594a87c64b2378dc9">&#9670;&nbsp;</a></span>erase() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class IteratorType , typename std::enable_if&lt; std::is_same&lt; IteratorType, typename basic_json_t::iterator &gt;::value||std::is_same&lt; IteratorType, typename basic_json_t::const_iterator &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">IteratorType nlohmann::basic_json::erase </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>remove elements given an iterator range </p>
<p>Removes the element specified by the range <code>[first; last)</code>. The iterator <em>first</em> does not need to be dereferenceable if <code>first == last</code>: erasing an empty range is a no-op.</p>
<p>If called on a primitive type other than <code>null</code>, the resulting JSON value will be <code>null</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>iterator to the beginning of the range to remove </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>iterator past the end of the range to remove </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Iterator following the last removed element. If the iterator <em>second</em> refers to the last element, the <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code> iterator is returned.</dd></dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">IteratorType</td><td>an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> or <a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a></td></tr>
</table>
</dd>
</dl>
<dl class="section post"><dt>Postcondition</dt><dd>Invalidates iterators and references at or after the point of the erase, including the <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code> iterator.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.307</td><td>if called on a <code>null</code> value; example: <code>"cannot use
erase() with null"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.203</td><td>if called on iterators which does not belong to the current JSON value; example: <code>"iterators do not fit current value"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.204</td><td>if called on a primitive type with invalid iterators (i.e., if <code>first != <a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code> and <code>last != <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>); example: <code>"iterators out of range"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity The complexity depends on the type:</p><ul>
<li>objects: <code>log(size()) + std::distance(first, last)</code></li>
<li>arrays: linear in the distance between <em>first</em> and <em>last</em>, plus linear in the distance between <em>last</em> and end of the container</li>
<li>strings and binary: linear in the length of the member</li>
<li>other types: constant</li>
</ul>
<p>@liveexample{The example shows the result of <code><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f" title="remove element given an iterator">erase()</a></code> for different JSON types.,erase__IteratorType_IteratorType}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">erase(IteratorType)</a> &ndash; removes the element <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> a given position </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a022404d92eb877a7ad5bfce198ef067a">erase(const typename object_t::key_type&amp;)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given key </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a49a7ac46583c77094f96a7717597ff5f">erase(const size_type)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given index</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a022404d92eb877a7ad5bfce198ef067a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a022404d92eb877a7ad5bfce198ef067a">&#9670;&nbsp;</a></span>erase() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> nlohmann::basic_json::erase </td>
<td>(</td>
<td class="paramtype">const typename object_t::key_type &amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>remove element from a JSON object given a key </p>
<p>Removes elements from a JSON object with the key value <em>key</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>value of the elements to remove</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of elements removed. If <em>ObjectType</em> is the default <code>std::map</code> type, the return value will always be <code>0</code> (<em>key</em> was not found) or <code>1</code> (<em>key</em> was found).</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>References and iterators to the erased elements are invalidated. Other references and iterators are not affected.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.307</td><td>when called on a type other than JSON object; example: <code>"cannot use erase() with null"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity <code>log(size()) + count(key)</code></p>
<p>@liveexample{The example shows the effect of <code><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f" title="remove element given an iterator">erase()</a></code>.,erase__key_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">erase(IteratorType)</a> &ndash; removes the element <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> a given position </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">erase(IteratorType, IteratorType)</a> &ndash; removes the elements in the given range </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a49a7ac46583c77094f96a7717597ff5f">erase(const size_type)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#aea7fc2a66a785e2f68535f63b54150a9" title="explicitly create an array from an initializer list">array</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given index</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a49a7ac46583c77094f96a7717597ff5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a49a7ac46583c77094f96a7717597ff5f">&#9670;&nbsp;</a></span>erase() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::erase </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>idx</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>remove element from a JSON array given an index </p>
<p>Removes element from a JSON array at the index <em>idx</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">idx</td><td>index of the element to remove</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.307</td><td>when called on a type other than JSON object; example: <code>"cannot use erase() with null"</code> </td></tr>
<tr><td class="paramname">out_of_range.401</td><td>when <code>idx &gt;= <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>; example: <code>"array index 17
is out of range"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in distance between <em>idx</em> and the end of the container.</p>
<p>@liveexample{The example shows the effect of <code><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f" title="remove element given an iterator">erase()</a></code>.,erase__size_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a0d0f5fb6f22126f7e3803dd7cdf7030f">erase(IteratorType)</a> &ndash; removes the element <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> a given position </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a24c397c38ce6984594a87c64b2378dc9">erase(IteratorType, IteratorType)</a> &ndash; removes the elements in the given range </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a022404d92eb877a7ad5bfce198ef067a">erase(const typename object_t::key_type&amp;)</a> &ndash; removes the element from an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> <a class="el" href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2" title="access specified array element with bounds checking">at</a> the given key</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="af4167275baa0b2da76cdc89b1117c300"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af4167275baa0b2da76cdc89b1117c300">&#9670;&nbsp;</a></span>find() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename KeyT &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::find </td>
<td>(</td>
<td class="paramtype">KeyT &amp;&amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>find an element in a JSON object </p>
<p>Finds an element in a JSON object with key equivalent to <em>key</em>. If the element is not found or the JSON value is not an object, <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> is returned.</p>
<dl class="section note"><dt>Note</dt><dd>This method always returns <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> when executed on a JSON type that is not an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key value of the element to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Iterator to an element with key equivalent to <em>key</em>. If no such element is found or the JSON value is not an object, past-the-end (see <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a>) iterator is returned.</dd></dl>
<p>@complexity Logarithmic in the size of the JSON object.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#af4167275baa0b2da76cdc89b1117c300" title="find an element in a JSON object">find()</a></code> is used.,find__key_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766">contains(KeyT&amp;&amp;) const</a> &ndash; checks whether a key exists</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a581684a08bf3fa341f9fcec34d3885a3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a581684a08bf3fa341f9fcec34d3885a3">&#9670;&nbsp;</a></span>find() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename KeyT &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> nlohmann::basic_json::find </td>
<td>(</td>
<td class="paramtype">KeyT &amp;&amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>find an element in a JSON object </p>
<p>find an element in a JSON object Finds an element in a JSON object with key equivalent to <em>key</em>. If the element is not found or the JSON value is not an object, <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> is returned.</p>
<dl class="section note"><dt>Note</dt><dd>This method always returns <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> when executed on a JSON type that is not an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key value of the element to search for.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Iterator to an element with key equivalent to <em>key</em>. If no such element is found or the JSON value is not an object, past-the-end (see <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a>) iterator is returned.</dd></dl>
<p>@complexity Logarithmic in the size of the JSON object.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#af4167275baa0b2da76cdc89b1117c300" title="find an element in a JSON object">find()</a></code> is used.,find__key_type}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766">contains(KeyT&amp;&amp;) const</a> &ndash; checks whether a key exists</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a369cf24de07945494df32e8b61e47917"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a369cf24de07945494df32e8b61e47917">&#9670;&nbsp;</a></span>count()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename KeyT &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> nlohmann::basic_json::count </td>
<td>(</td>
<td class="paramtype">KeyT &amp;&amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns the number of occurrences of a key in a JSON object </p>
<p>Returns the number of elements with key <em>key</em>. If ObjectType is the default <code>std::map</code> type, the return value will always be <code>0</code> (<em>key</em> was not found) or <code>1</code> (<em>key</em> was found).</p>
<dl class="section note"><dt>Note</dt><dd>This method always returns <code>0</code> when executed on a JSON type that is not an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key value of the element to count</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Number of elements with key <em>key</em>. If the JSON value is not an object, the return value will be <code>0</code>.</dd></dl>
<p>@complexity Logarithmic in the size of the JSON object.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a369cf24de07945494df32e8b61e47917" title="returns the number of occurrences of a key in a JSON object">count()</a></code> is used.,count}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a29333078b6e6cb76f2b5d12590bbf766"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a29333078b6e6cb76f2b5d12590bbf766">&#9670;&nbsp;</a></span>contains() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename KeyT , typename std::enable_if&lt; !std::is_same&lt; typename std::decay&lt; KeyT &gt;::type, json_pointer &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool nlohmann::basic_json::contains </td>
<td>(</td>
<td class="paramtype">KeyT &amp;&amp;&#160;</td>
<td class="paramname"><em>key</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>check the existence of an element in a JSON object </p>
<p>Check whether an element exists in a JSON object with key equivalent to <em>key</em>. If the element is not found or the JSON value is not an object, false is returned.</p>
<dl class="section note"><dt>Note</dt><dd>This method always returns false when executed on a JSON type that is not an object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">key</td><td>key value to check its existence.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if an element with specified <em>key</em> exists. If no such element with such key is found or the JSON value is not an object, false is returned.</dd></dl>
<p>@complexity Logarithmic in the size of the JSON object.</p>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766" title="check the existence of an element in a JSON object">contains()</a></code>.,contains}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#af4167275baa0b2da76cdc89b1117c300">find(KeyT&amp;&amp;)</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> element </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#af700bb8239390cf462126f0c96606fae">contains(const json_pointer&amp;) const</a> &ndash; checks the existence for a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a4ac83a20750a2bfacbf9d30f3e51c3bb" title="the type of an element pointer">pointer</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.6.0 </dd></dl>
</div>
</div>
<a id="af700bb8239390cf462126f0c96606fae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af700bb8239390cf462126f0c96606fae">&#9670;&nbsp;</a></span>contains() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool nlohmann::basic_json::contains </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>check the existence of an element in a JSON object given a JSON pointer </p>
<p>Check whether the given JSON pointer <em>ptr</em> can be resolved in the current JSON value.</p>
<dl class="section note"><dt>Note</dt><dd>This method can be executed on any JSON value type.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>JSON pointer to check its existence.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if the JSON pointer can be resolved to a stored value, false otherwise.</dd></dl>
<dl class="section post"><dt>Postcondition</dt><dd>If <code>j.contains(ptr)</code> returns true, it is safe to call <code>j[ptr]</code>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.106</td><td>if an array index begins with '0' </td></tr>
<tr><td class="paramname">parse_error.109</td><td>if an array index was not a number</td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the JSON object.</p>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766" title="check the existence of an element in a JSON object">contains()</a></code>.,contains_json_pointer}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a29333078b6e6cb76f2b5d12590bbf766">contains(KeyT &amp;&amp;) const</a> &ndash; checks the existence of a key</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.7.0 </dd></dl>
</div>
</div>
<a id="a7eae0427fb22e147d9c2ed1d532ed2aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7eae0427fb22e147d9c2ed1d532ed2aa">&#9670;&nbsp;</a></span>begin() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns an iterator to the first element </p>
<p>Returns an iterator to the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>iterator to the first element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>.,begin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">cbegin()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">cend()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aeb76c192095f808283822c8401d2a3a1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeb76c192095f808283822c8401d2a3a1">&#9670;&nbsp;</a></span>begin() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> nlohmann::basic_json::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const iterator to the first element </p>
<p>Returns a const iterator to the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>const iterator to the first element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090" title="returns a const iterator to the first element">cbegin()</a></code>.,cbegin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">cend()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ae1e7bbc736b7e9d1155f9ee6c95b2090"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae1e7bbc736b7e9d1155f9ee6c95b2090">&#9670;&nbsp;</a></span>cbegin()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> nlohmann::basic_json::cbegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const iterator to the first element </p>
<p>Returns a const iterator to the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>const iterator to the first element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090" title="returns a const iterator to the first element">cbegin()</a></code>.,cbegin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">cend()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a4db895fabb72f717b2c641a5c338d5a8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4db895fabb72f717b2c641a5c338d5a8">&#9670;&nbsp;</a></span>end() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::end </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns an iterator to one past the last element </p>
<p>Returns an iterator to one past the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>iterator one past the last element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>.,end}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f">cend()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">cbegin()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a94522e3b348ef50d9c212121b3478ee1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a94522e3b348ef50d9c212121b3478ee1">&#9670;&nbsp;</a></span>end() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> nlohmann::basic_json::end </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const iterator to one past the last element </p>
<p>Returns a const iterator to one past the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>const iterator one past the last element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f" title="returns a const iterator to one past the last element">cend()</a></code>.,cend}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">cbegin()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aab2588e4f8767b792656e5ebcf922a9f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab2588e4f8767b792656e5ebcf922a9f">&#9670;&nbsp;</a></span>cend()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a> nlohmann::basic_json::cend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const iterator to one past the last element </p>
<p>Returns a const iterator to one past the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-begin-end.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<dl class="section return"><dt>Returns</dt><dd>const iterator one past the last element</dd></dl>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#aab2588e4f8767b792656e5ebcf922a9f" title="returns a const iterator to one past the last element">cend()</a></code>.,cend}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8">end()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa">begin()</a> &ndash; returns an <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae1e7bbc736b7e9d1155f9ee6c95b2090">cbegin()</a> &ndash; returns a const <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a32674498f617591fff4002ad0934a4f6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a32674498f617591fff4002ad0934a4f6">&#9670;&nbsp;</a></span>rbegin() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a0d2df32b8689b776dd3b0865f1362f40">reverse_iterator</a> nlohmann::basic_json::rbegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns an iterator to the reverse-beginning </p>
<p>Returns an iterator to the reverse-beginning; that is, the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>reverse_iterator(end())</code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6" title="returns an iterator to the reverse-beginning">rbegin()</a></code>.,rbegin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">crbegin()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">crend()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a8d792070799098e6172e82a3865875ee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d792070799098e6172e82a3865875ee">&#9670;&nbsp;</a></span>rbegin() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a> nlohmann::basic_json::rbegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const reverse iterator to the last element </p>
<p>Returns a const iterator to the reverse-beginning; that is, the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6" title="returns an iterator to the reverse-beginning">rbegin()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5" title="returns a const reverse iterator to the last element">crbegin()</a></code>.,crbegin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">crend()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a27d668c5b974f4b3bded760f5553b5c6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a27d668c5b974f4b3bded760f5553b5c6">&#9670;&nbsp;</a></span>rend() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a0d2df32b8689b776dd3b0865f1362f40">reverse_iterator</a> nlohmann::basic_json::rend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns an iterator to the reverse-end </p>
<p>Returns an iterator to the reverse-end; that is, one before the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>reverse_iterator(begin())</code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6" title="returns an iterator to the reverse-end">rend()</a></code>.,rend}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">crend()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">crbegin()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a6adf45af5f550ae31fe3bf0759b9af14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6adf45af5f550ae31fe3bf0759b9af14">&#9670;&nbsp;</a></span>rend() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a> nlohmann::basic_json::rend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const reverse iterator to one before the first </p>
<p>Returns a const reverse iterator to the reverse-end; that is, one before the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6" title="returns an iterator to the reverse-end">rend()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6" title="returns a const reverse iterator to one before the first">crend()</a></code>.,crend}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">crbegin()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="abe4ea2bbb97eba3baad6c4286366e7c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe4ea2bbb97eba3baad6c4286366e7c5">&#9670;&nbsp;</a></span>crbegin()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a> nlohmann::basic_json::crbegin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const reverse iterator to the last element </p>
<p>Returns a const iterator to the reverse-beginning; that is, the last element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6" title="returns an iterator to the reverse-beginning">rbegin()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5" title="returns a const reverse iterator to the last element">crbegin()</a></code>.,crbegin}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6">crend()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ae54982c31d6c21e140980ce502425cf6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae54982c31d6c21e140980ce502425cf6">&#9670;&nbsp;</a></span>crend()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a59564ce7bf7dad8be7d4d8184be05d91">const_reverse_iterator</a> nlohmann::basic_json::crend </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns a const reverse iterator to one before the first </p>
<p>Returns a const reverse iterator to the reverse-end; that is, one before the first element.</p>
<div class="image">
<object type="image/svg+xml" data="range-rbegin-rend.svg" style="pointer-events: none;"></object>
<div class="caption">
Illustration from cppreference.com</div></div>
<p>@complexity Constant.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/ReversibleContainer">ReversibleContainer</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>const_cast&lt;const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp;&gt;(*this).<a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6" title="returns an iterator to the reverse-end">rend()</a></code>.</li>
</ul>
<p>@liveexample{The following code shows an example for <code><a class="el" href="classnlohmann_1_1basic__json.html#ae54982c31d6c21e140980ce502425cf6" title="returns a const reverse iterator to one before the first">crend()</a></code>.,crend}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a27d668c5b974f4b3bded760f5553b5c6">rend()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a32674498f617591fff4002ad0934a4f6">rbegin()</a> &ndash; returns a reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#abe4ea2bbb97eba3baad6c4286366e7c5">crbegin()</a> &ndash; returns a const reverse <a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d" title="an iterator for a basic_json container">iterator</a> to the beginning</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a0a8051760196ac813fd5eb3c8d5a2976"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a8051760196ac813fd5eb3c8d5a2976">&#9670;&nbsp;</a></span>iterator_wrapper() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt;<a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&gt; nlohmann::basic_json::iterator_wrapper </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td>
<td class="paramname"><em>ref</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>wrapper to access iterator member functions in range-based for </p>
<p>This function allows to access <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#a15dfb2744fed2ef40c12a9e9a20d6dbc">iterator::key()</a> and <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#ab447c50354c6611fa2ae0100ac17845c">iterator::value()</a> during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator.</p>
<p>For loop without iterator_wrapper:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it = j_object.begin(); it != j_object.end(); ++it)</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop without iterator proxy:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : j_object)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// &quot;it&quot; is of type json::reference and has no key() member</span></div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;value: &quot;</span> &lt;&lt; it &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop with iterator proxy:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : <a class="code" href="classnlohmann_1_1basic__json.html#a0a8051760196ac813fd5eb3c8d5a2976">json::iterator_wrapper</a>(j_object))</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>When iterating over an array, <code>key()</code> will return the index of the element as string (see example).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ref</td><td>reference to a JSON value </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iteration proxy object wrapping <em>ref</em> with an interface to use in range-based for loops</dd></dl>
<p>@liveexample{The following code shows how the wrapper is used,iterator_wrapper}</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section note"><dt>Note</dt><dd>The name of this function is not yet final and may change in the future.</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This stream operator is deprecated and will be removed in future 4.0.0 of the library. Please use <a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977">items()</a> instead; that is, replace <code>json::iterator_wrapper(j)</code> with <code>j.items()</code>. </dd></dl>
</div>
</div>
<a id="aca63364d2dbbda5b8848cf6987ab13b4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aca63364d2dbbda5b8848cf6987ab13b4">&#9670;&nbsp;</a></span>iterator_wrapper() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static <a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt;<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&gt; nlohmann::basic_json::iterator_wrapper </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>ref</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>wrapper to access iterator member functions in range-based for </p>
<p>This function allows to access <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#a15dfb2744fed2ef40c12a9e9a20d6dbc">iterator::key()</a> and <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#ab447c50354c6611fa2ae0100ac17845c">iterator::value()</a> during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator.</p>
<p>For loop without iterator_wrapper:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it = j_object.begin(); it != j_object.end(); ++it)</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop without iterator proxy:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : j_object)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// &quot;it&quot; is of type json::reference and has no key() member</span></div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;value: &quot;</span> &lt;&lt; it &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop with iterator proxy:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : <a class="code" href="classnlohmann_1_1basic__json.html#a0a8051760196ac813fd5eb3c8d5a2976">json::iterator_wrapper</a>(j_object))</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>When iterating over an array, <code>key()</code> will return the index of the element as string (see example).</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ref</td><td>reference to a JSON value </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iteration proxy object wrapping <em>ref</em> with an interface to use in range-based for loops</dd></dl>
<p>@liveexample{The following code shows how the wrapper is used,iterator_wrapper}</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section note"><dt>Note</dt><dd>The name of this function is not yet final and may change in the future.</dd></dl>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>This stream operator is deprecated and will be removed in future 4.0.0 of the library. Please use <a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977">items()</a> instead; that is, replace <code>json::iterator_wrapper(j)</code> with <code>j.items()</code>. </dd></dl>
</div>
</div>
<a id="a5961446010dfc494e0c247b4e9026977"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5961446010dfc494e0c247b4e9026977">&#9670;&nbsp;</a></span>items() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt;<a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>&gt; nlohmann::basic_json::items </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>helper to access iterator member functions in range-based for </p>
<p>This function allows to access <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#a15dfb2744fed2ef40c12a9e9a20d6dbc">iterator::key()</a> and <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#ab447c50354c6611fa2ae0100ac17845c">iterator::value()</a> during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator.</p>
<p>For loop without <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it = j_object.begin(); it != j_object.end(); ++it)</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop without <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : j_object)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// &quot;it&quot; is of type json::reference and has no key() member</span></div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;value: &quot;</span> &lt;&lt; it &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop with <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; el : j_object.items())</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; el.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; el.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>The <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function also allows to use <a href="https://en.cppreference.com/w/cpp/language/structured_binding">structured bindings</a> (C++17):</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; [key, val] : j_object.items())</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; <a class="code" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d">key</a> &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; val &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>When iterating over an array, <code>key()</code> will return the index of the element as string (see example). For primitive types (e.g., numbers), <code>key()</code> returns an empty string.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> on temporary objects is dangerous. Make sure the object's lifetime exeeds the iteration. See <a href="https://github.com/nlohmann/json/issues/2040">https://github.com/nlohmann/json/issues/2040</a> for more information.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>iteration proxy object wrapping <em>ref</em> with an interface to use in range-based for loops</dd></dl>
<p>@liveexample{The following code shows how the function is used.,items}</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.1.0, structured bindings support since 3.5.0. </dd></dl>
</div>
</div>
<a id="a79bac81ac682a6327fbd4e792190dfc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a79bac81ac682a6327fbd4e792190dfc6">&#9670;&nbsp;</a></span>items() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1detail_1_1iteration__proxy.html">iteration_proxy</a>&lt;<a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&gt; nlohmann::basic_json::items </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>helper to access iterator member functions in range-based for </p>
<p>This function allows to access <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#a15dfb2744fed2ef40c12a9e9a20d6dbc">iterator::key()</a> and <a class="el" href="classnlohmann_1_1detail_1_1iter__impl.html#ab447c50354c6611fa2ae0100ac17845c">iterator::value()</a> during range-based for loops. In these loops, a reference to the JSON values is returned, so there is no access to the underlying iterator.</p>
<p>For loop without <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it = j_object.begin(); it != j_object.end(); ++it)</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; it.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; it.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop without <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span> it : j_object)</div>
<div class="line">{</div>
<div class="line"> <span class="comment">// &quot;it&quot; is of type json::reference and has no key() member</span></div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;value: &quot;</span> &lt;&lt; it &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>Range-based for loop with <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function:</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; el : j_object.items())</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; el.key() &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; el.value() &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><p>The <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> function also allows to use <a href="https://en.cppreference.com/w/cpp/language/structured_binding">structured bindings</a> (C++17):</p>
<div class="fragment"><div class="line"><span class="keywordflow">for</span> (<span class="keyword">auto</span>&amp; [key, val] : j_object.items())</div>
<div class="line">{</div>
<div class="line"> std::cout &lt;&lt; <span class="stringliteral">&quot;key: &quot;</span> &lt;&lt; <a class="code" href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d">key</a> &lt;&lt; <span class="stringliteral">&quot;, value:&quot;</span> &lt;&lt; val &lt;&lt; <span class="charliteral">&#39;\n&#39;</span>;</div>
<div class="line">}</div>
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>When iterating over an array, <code>key()</code> will return the index of the element as string (see example). For primitive types (e.g., numbers), <code>key()</code> returns an empty string.</dd></dl>
<dl class="section warning"><dt>Warning</dt><dd>Using <code><a class="el" href="classnlohmann_1_1basic__json.html#a5961446010dfc494e0c247b4e9026977" title="helper to access iterator member functions in range-based for">items()</a></code> on temporary objects is dangerous. Make sure the object's lifetime exeeds the iteration. See <a href="https://github.com/nlohmann/json/issues/2040">https://github.com/nlohmann/json/issues/2040</a> for more information.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd>iteration proxy object wrapping <em>ref</em> with an interface to use in range-based for loops</dd></dl>
<p>@liveexample{The following code shows how the function is used.,items}</p>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 3.1.0, structured bindings support since 3.5.0. </dd></dl>
</div>
</div>
<a id="a54599e2a109faaebfb50df824567e5ae"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a54599e2a109faaebfb50df824567e5ae">&#9670;&nbsp;</a></span>empty()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool nlohmann::basic_json::empty </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>checks whether the container is empty. </p>
<p>Checks if a JSON value has no elements (i.e. whether its <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65">size</a> is <code>0</code>).</p>
<dl class="section return"><dt>Returns</dt><dd>The return value depends on the different types and is defined as follows: <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">return value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>true</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">result of function <code>object_t::empty()</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">result of function <code>array_t::empty()</code> </td></tr>
</table>
</dd></dl>
<p>@liveexample{The following code uses <code><a class="el" href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae" title="checks whether the container is empty.">empty()</a></code> to check if a JSON object contains any elements.,empty}</p>
<p>@complexity Constant, as long as <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> satisfy the Container concept; that is, their <code><a class="el" href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae" title="checks whether the container is empty.">empty()</a></code> functions have constant complexity.</p>
<p>@iterators No changes.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<dl class="section note"><dt>Note</dt><dd>This function does not return whether a string stored as JSON value is empty - it returns whether the JSON container itself is empty which is false in the case of a string.</dd></dl>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code><a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a> == <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a></code>.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65">size()</a> &ndash; returns the number of elements</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aaa2519eb5a174547b8a2f6019def9b65"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaa2519eb5a174547b8a2f6019def9b65">&#9670;&nbsp;</a></span>size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> nlohmann::basic_json::size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns the number of elements </p>
<p>Returns the number of elements in a JSON value.</p>
<dl class="section return"><dt>Returns</dt><dd>The return value depends on the different types and is defined as follows: <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">return value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>0</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>1</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>1</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>1</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><code>1</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">result of function object_t::size() </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">result of function array_t::size() </td></tr>
</table>
</dd></dl>
<p>@liveexample{The following code calls <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code> on the different value types.,size}</p>
<p>@complexity Constant, as long as <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> satisfy the Container concept; that is, their <a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a> functions have constant complexity.</p>
<p>@iterators No changes.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<dl class="section note"><dt>Note</dt><dd>This function does not return the length of a string stored as JSON value - it returns the number of elements in the JSON value which is 1 in the case of a string.</dd></dl>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of <code>std::distance(<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a>)</code>.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae">empty()</a> &ndash; checks whether the container is <a class="el" href="classnlohmann_1_1basic__json.html#a54599e2a109faaebfb50df824567e5ae" title="checks whether the container is empty.">empty</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f">max_size()</a> &ndash; returns the maximal number of elements</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a502e4020141ed42d55e5d1fd88b3e80f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a502e4020141ed42d55e5d1fd88b3e80f">&#9670;&nbsp;</a></span>max_size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a> nlohmann::basic_json::max_size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>returns the maximum possible number of elements </p>
<p>Returns the maximum number of elements a JSON value is able to hold due to system or library implementation limitations, i.e. <code>std::distance(<a class="el" href="classnlohmann_1_1basic__json.html#a7eae0427fb22e147d9c2ed1d532ed2aa" title="returns an iterator to the first element">begin()</a>, <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a>)</code> for the JSON value.</p>
<dl class="section return"><dt>Returns</dt><dd>The return value depends on the different types and is defined as follows: <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">return value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>0</code> (same as <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>1</code> (same as <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>1</code> (same as <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>1</code> (same as <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><code>1</code> (same as <code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>) </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">result of function <code>object_t::max_size()</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">result of function <code>array_t::max_size()</code> </td></tr>
</table>
</dd></dl>
<p>@liveexample{The following code calls <code><a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f" title="returns the maximum possible number of elements">max_size()</a></code> on the different value types. Note the output is implementation specific.,max_size}</p>
<p>@complexity Constant, as long as <a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> and <a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> satisfy the Container concept; that is, their <code><a class="el" href="classnlohmann_1_1basic__json.html#a502e4020141ed42d55e5d1fd88b3e80f" title="returns the maximum possible number of elements">max_size()</a></code> functions have constant complexity.</p>
<p>@iterators No changes.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@requirement This function helps <code><a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a></code> satisfying the <a href="https://en.cppreference.com/w/cpp/named_req/Container">Container</a> requirements:</p><ul>
<li>The complexity is constant.</li>
<li>Has the semantics of returning <code>b.size()</code> where <code>b</code> is the largest possible JSON value.</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65">size()</a> &ndash; returns the number of elements</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a680c6cbaca83984fd7a5dd7496f86594"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a680c6cbaca83984fd7a5dd7496f86594">&#9670;&nbsp;</a></span>clear()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::clear </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>clears the contents </p>
<p>Clears the content of a JSON value and resets it to the default value as if <a class="el" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json(value_t)</a> would have been called with the current value type from <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">type()</a>:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">initial value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>""</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>0</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">An empty byte vector </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><code>{}</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><code>[]</code> </td></tr>
</table>
<dl class="section post"><dt>Postcondition</dt><dd>Has the same effect as calling <div class="fragment"><div class="line">*<span class="keyword">this</span> = <a class="code" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json</a>(<a class="code" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">type</a>());</div>
</div><!-- fragment --></dd></dl>
<p>@liveexample{The example below shows the effect of <code><a class="el" href="classnlohmann_1_1basic__json.html#a680c6cbaca83984fd7a5dd7496f86594" title="clears the contents">clear()</a></code> to different JSON types.,clear}</p>
<p>@complexity Linear in the size of the JSON value.</p>
<p>@iterators All iterators, pointers and references related to this container are invalidated.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">basic_json(value_t)</a> &ndash; constructor that creates an <a class="el" href="classnlohmann_1_1basic__json.html#a10c8164cc94feabf095b959633c0d709" title="explicitly create an object from an initializer list">object</a> with the same <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> than calling <code><a class="el" href="classnlohmann_1_1basic__json.html#a680c6cbaca83984fd7a5dd7496f86594" title="clears the contents">clear()</a></code></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a887cd40d16a12596c24cd42c66107ac6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a887cd40d16a12596c24cd42c66107ac6">&#9670;&nbsp;</a></span>push_back() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::push_back </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an array </p>
<p>Appends the given element <em>val</em> to the end of the JSON value. If the function is called on a JSON null value, an empty array is created before appending <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON array</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON array or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Amortized constant.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON array. Note how the <code>null</code> value was silently converted to a JSON array.,push_back}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="afe3c79845dc1dd2243724558859d7e4b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3c79845dc1dd2243724558859d7e4b">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[1/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator+= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an array </p>
<p>add an object to an array Appends the given element <em>val</em> to the end of the JSON value. If the function is called on a JSON null value, an empty array is created before appending <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON array</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON array or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Amortized constant.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON array. Note how the <code>null</code> value was silently converted to a JSON array.,push_back}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="abf9a7dcd2b7a3080ccfacf5d0ebf12e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abf9a7dcd2b7a3080ccfacf5d0ebf12e5">&#9670;&nbsp;</a></span>push_back() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::push_back </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an array </p>
<p>add an object to an array Appends the given element <em>val</em> to the end of the JSON value. If the function is called on a JSON null value, an empty array is created before appending <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON array</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON array or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Amortized constant.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON array. Note how the <code>null</code> value was silently converted to a JSON array.,push_back}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a4ec964f3346fa981453933901ca39dd1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ec964f3346fa981453933901ca39dd1">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[2/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator+= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an array </p>
<p>add an object to an array Appends the given element <em>val</em> to the end of the JSON value. If the function is called on a JSON null value, an empty array is created before appending <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON array</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON array or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Amortized constant.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON array. Note how the <code>null</code> value was silently converted to a JSON array.,push_back}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="affac3bab5efcb26cdcd0942d24ad0ab5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affac3bab5efcb26cdcd0942d24ad0ab5">&#9670;&nbsp;</a></span>push_back() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::push_back </td>
<td>(</td>
<td class="paramtype">const typename object_t::value_type &amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an object </p>
<p>Inserts the given element <em>val</em> to the JSON object. If the function is called on a JSON null value, an empty object is created before inserting <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON object</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON object or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container, O(log(<code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>)).</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON object. Note how the <code>null</code> value was silently converted to a JSON object.,push_back__object_t__value}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="acbfa964cfa7c74f92d48a65eae744cfd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acbfa964cfa7c74f92d48a65eae744cfd">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[3/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator+= </td>
<td>(</td>
<td class="paramtype">const typename object_t::value_type &amp;&#160;</td>
<td class="paramname"><em>val</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an object </p>
<p>add an object to an object Inserts the given element <em>val</em> to the JSON object. If the function is called on a JSON null value, an empty object is created before inserting <em>val</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>the value to add to the JSON object</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.308</td><td>when called on a type other than JSON object or null; example: <code>"cannot use push_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container, O(log(<code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>)).</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> and <code>+=</code> can be used to add elements to a JSON object. Note how the <code>null</code> value was silently converted to a JSON object.,push_back__object_t__value}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a4f811ef36976a82a8e29cb1ae7c40152"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4f811ef36976a82a8e29cb1ae7c40152">&#9670;&nbsp;</a></span>push_back() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::push_back </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>init</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an object </p>
<p>This function allows to use <code>push_back</code> with an initializer list. In case</p>
<ol type="1">
<li>the current value is an object,</li>
<li>the initializer list <em>init</em> contains only two elements, and</li>
<li>the first element of <em>init</em> is a string,</li>
</ol>
<p><em>init</em> is converted into an object element and added using <a class="el" href="classnlohmann_1_1basic__json.html#affac3bab5efcb26cdcd0942d24ad0ab5">push_back(const typename object_t::value_type&amp;)</a>. Otherwise, <em>init</em> is converted to a JSON value and added using <a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6">push_back(basic_json&amp;&amp;)</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>an initializer list</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the initializer list <em>init</em>.</p>
<dl class="section note"><dt>Note</dt><dd>This function is required to resolve an ambiguous overload error, because pairs like <code>{"key", "value"}</code> can be both interpreted as <code>object_t::value_type</code> or <code>std::initializer_list&lt;<a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&gt;</code>, see <a href="https://github.com/nlohmann/json/issues/235">https://github.com/nlohmann/json/issues/235</a> for more information.</dd></dl>
<p>@liveexample{The example shows how initializer lists are treated as objects when possible.,push_back__initializer_list} </p>
</div>
</div>
<a id="ad7ca83d8fdd49dae585f9980af5f7a8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad7ca83d8fdd49dae585f9980af5f7a8c">&#9670;&nbsp;</a></span>operator+=() <span class="overload">[4/4]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator+= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>init</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an object </p>
<p>add an object to an object This function allows to use <code>push_back</code> with an initializer list. In case</p>
<ol type="1">
<li>the current value is an object,</li>
<li>the initializer list <em>init</em> contains only two elements, and</li>
<li>the first element of <em>init</em> is a string,</li>
</ol>
<p><em>init</em> is converted into an object element and added using <a class="el" href="classnlohmann_1_1basic__json.html#affac3bab5efcb26cdcd0942d24ad0ab5">push_back(const typename object_t::value_type&amp;)</a>. Otherwise, <em>init</em> is converted to a JSON value and added using <a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6">push_back(basic_json&amp;&amp;)</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">init</td><td>an initializer list</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the initializer list <em>init</em>.</p>
<dl class="section note"><dt>Note</dt><dd>This function is required to resolve an ambiguous overload error, because pairs like <code>{"key", "value"}</code> can be both interpreted as <code>object_t::value_type</code> or <code>std::initializer_list&lt;<a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&gt;</code>, see <a href="https://github.com/nlohmann/json/issues/235">https://github.com/nlohmann/json/issues/235</a> for more information.</dd></dl>
<p>@liveexample{The example shows how initializer lists are treated as objects when possible.,push_back__initializer_list} </p>
</div>
</div>
<a id="a58837bac1c40038dcb07f437a02735da"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58837bac1c40038dcb07f437a02735da">&#9670;&nbsp;</a></span>emplace_back()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class... Args&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::emplace_back </td>
<td>(</td>
<td class="paramtype">Args &amp;&amp;...&#160;</td>
<td class="paramname"><em>args</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an array </p>
<p>Creates a JSON value from the passed parameters <em>args</em> to the end of the JSON value. If the function is called on a JSON null value, an empty array is created before appending the value created from <em>args</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>arguments to forward to a constructor of <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> </td></tr>
</table>
</dd>
</dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Args</td><td>compatible types to create a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> object</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the inserted element</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.311</td><td>when called on a type other than JSON array or null; example: <code>"cannot use emplace_back() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Amortized constant.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a887cd40d16a12596c24cd42c66107ac6" title="add an object to an array">push_back()</a></code> can be used to add elements to a JSON array. Note how the <code>null</code> value was silently converted to a JSON array.,emplace_back}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.8, returns reference since 3.7.0 </dd></dl>
</div>
</div>
<a id="ae3866ccade11e7b73902169714363f21"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae3866ccade11e7b73902169714363f21">&#9670;&nbsp;</a></span>emplace()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class... Args&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::pair&lt;<a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a>, bool&gt; nlohmann::basic_json::emplace </td>
<td>(</td>
<td class="paramtype">Args &amp;&amp;...&#160;</td>
<td class="paramname"><em>args</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>add an object to an object if key does not exist </p>
<p>Inserts a new element into a JSON object constructed in-place with the given <em>args</em> if there is no element with the key in the container. If the function is called on a JSON null value, an empty object is created before appending the value created from <em>args</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">args</td><td>arguments to forward to a constructor of <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> </td></tr>
</table>
</dd>
</dl>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">Args</td><td>compatible types to create a <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> object</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a pair consisting of an iterator to the inserted element, or the already-existing element if no insertion happened, and a bool denoting whether the insertion took place.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.311</td><td>when called on a type other than JSON object or null; example: <code>"cannot use emplace() with number"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic in the size of the container, O(log(<code><a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a></code>)).</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ae3866ccade11e7b73902169714363f21" title="add an object to an object if key does not exist">emplace()</a></code> can be used to add elements to a JSON object. Note how the <code>null</code> value was silently converted to a JSON object. Further note how no value is added if there was already one value stored with the same key.,emplace}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.8 </dd></dl>
</div>
</div>
<a id="ab80c4bdc11b40246f668008bae80df25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab80c4bdc11b40246f668008bae80df25">&#9670;&nbsp;</a></span>insert_iterator()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename... Args&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert_iterator </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">Args &amp;&amp;...&#160;</td>
<td class="paramname"><em>args</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Helper for insertion of an iterator </p><dl class="section note"><dt>Note</dt><dd>: This uses std::distance to support GCC 4.8, see <a href="https://github.com/nlohmann/json/pull/1257">https://github.com/nlohmann/json/pull/1257</a> </dd></dl>
</div>
</div>
<a id="ac6be8bd68e9dffd793846e0f0b239d62"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac6be8bd68e9dffd793846e0f0b239d62">&#9670;&nbsp;</a></span>insert() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts element </p>
<p>Inserts element <em>val</em> before iterator <em>pos</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator before which the content will be inserted; may be the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> iterator </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>element to insert </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iterator pointing to the inserted <em>val</em>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than arrays; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if <em>pos</em> is not an iterator of *this; example: <code>"iterator does not fit current value"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant plus linear in the distance between <em>pos</em> and end of the container.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a3b86713def43fb79d40cb344b826033c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b86713def43fb79d40cb344b826033c">&#9670;&nbsp;</a></span>insert() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&amp;&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts element </p>
<p>inserts element Inserts element <em>val</em> before iterator <em>pos</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator before which the content will be inserted; may be the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> iterator </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>element to insert </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iterator pointing to the inserted <em>val</em>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than arrays; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if <em>pos</em> is not an iterator of *this; example: <code>"iterator does not fit current value"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant plus linear in the distance between <em>pos</em> and end of the container.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a58e65af3dd9223d8593c6ca1a8477c3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58e65af3dd9223d8593c6ca1a8477c3f">&#9670;&nbsp;</a></span>insert() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a9eaf1dcc25d6e7bd204f72877cef254b">size_type</a>&#160;</td>
<td class="paramname"><em>cnt</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>val</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts elements </p>
<p>Inserts <em>cnt</em> copies of <em>val</em> before iterator <em>pos</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator before which the content will be inserted; may be the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> iterator </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">cnt</td><td>number of copies of <em>val</em> to insert </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">val</td><td>element to insert </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iterator pointing to the first element inserted, or <em>pos</em> if <code>cnt==0</code></dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than arrays; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if <em>pos</em> is not an iterator of *this; example: <code>"iterator does not fit current value"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in <em>cnt</em> plus linear in the distance between <em>pos</em> and end of the container.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert__count}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a939390bb7d48b11c64413ec79c7104fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a939390bb7d48b11c64413ec79c7104fa">&#9670;&nbsp;</a></span>insert() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts elements </p>
<p>Inserts elements from range <code>[first, last)</code> before iterator <em>pos</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator before which the content will be inserted; may be the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> iterator </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>begin of the range of elements to insert </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>end of the range of elements to insert</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than arrays; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if <em>pos</em> is not an iterator of *this; example: <code>"iterator does not fit current value"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.210</td><td>if <em>first</em> and <em>last</em> do not belong to the same JSON value; example: <code>"iterators do not fit"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.211</td><td>if <em>first</em> or <em>last</em> are iterators into container for which insert is called; example: <code>"passed iterators may not
belong to container"</code></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iterator pointing to the first element inserted, or <em>pos</em> if <code>first==last</code></dd></dl>
<p>@complexity Linear in <code>std::distance(first, last)</code> plus linear in the distance between <em>pos</em> and end of the container.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert__range}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="adaae3e55f4349e53d1526a6da464d34f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adaae3e55f4349e53d1526a6da464d34f">&#9670;&nbsp;</a></span>insert() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#aa3ab6c99db6584c47624c29037f9f14d">iterator</a> nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>pos</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae8b2251872b6a3a9b04147d2ffa5a839">initializer_list_t</a>&#160;</td>
<td class="paramname"><em>ilist</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts elements </p>
<p>Inserts elements from initializer list <em>ilist</em> before iterator <em>pos</em>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">pos</td><td>iterator before which the content will be inserted; may be the <a class="el" href="classnlohmann_1_1basic__json.html#a4db895fabb72f717b2c641a5c338d5a8" title="returns an iterator to one past the last element">end()</a> iterator </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ilist</td><td>initializer list to insert the values from</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than arrays; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if <em>pos</em> is not an iterator of *this; example: <code>"iterator does not fit current value"</code></td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>iterator pointing to the first element inserted, or <em>pos</em> if <code>ilist</code> is empty</dd></dl>
<p>@complexity Linear in <code>ilist.size()</code> plus linear in the distance between <em>pos</em> and end of the container.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert__ilist}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aab2bc544912cb3954b38ee76772c16d7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab2bc544912cb3954b38ee76772c16d7">&#9670;&nbsp;</a></span>insert() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::insert </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>inserts elements </p>
<p>Inserts elements from range <code>[first, last)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>begin of the range of elements to insert </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>end of the range of elements to insert</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.309</td><td>if called on JSON values other than objects; example: <code>"cannot use insert() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if iterator <em>first</em> or <em>last</em> does does not point to an object; example: <code>"iterators first and last must point to
objects"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.210</td><td>if <em>first</em> and <em>last</em> do not belong to the same JSON value; example: <code>"iterators do not fit"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Logarithmic: <code>O(N*log(<a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a> + N))</code>, where <code>N</code> is the number of elements to insert.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#ac6be8bd68e9dffd793846e0f0b239d62" title="inserts element">insert()</a></code> is used.,insert__range_object}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a6c02637be3d8bd730a14082cc05f7a85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c02637be3d8bd730a14082cc05f7a85">&#9670;&nbsp;</a></span>update() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>updates a JSON object from another object, overwriting existing keys </p>
<p>Inserts all values from JSON object <em>j</em> and overwrites existing keys.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON object to read values from</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.312</td><td>if called on JSON values other than objects; example: <code>"cannot use update() with string"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity O(N*log(<a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a> + N)), where N is the number of elements to insert.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85" title="updates a JSON object from another object, overwriting existing keys">update()</a></code> is used.,update}</p>
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.python.org/3.6/library/stdtypes.html#dict.update">https://docs.python.org/3.6/library/stdtypes.html#dict.update</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="a0dbd5c8bdff3d633ff6d1d373297b777"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0dbd5c8bdff3d633ff6d1d373297b777">&#9670;&nbsp;</a></span>update() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::update </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a7a09a580613f00c73015c19e5e7c44ba">const_iterator</a>&#160;</td>
<td class="paramname"><em>last</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>updates a JSON object from another object, overwriting existing keys </p>
<p>Inserts all values from from range <code>[first, last)</code> and overwrites existing keys.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>begin of the range of elements to insert </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>end of the range of elements to insert</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.312</td><td>if called on JSON values other than objects; example: <code>"cannot use update() with string"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.202</td><td>if iterator <em>first</em> or <em>last</em> does does not point to an object; example: <code>"iterators first and last must point to
objects"</code> </td></tr>
<tr><td class="paramname">invalid_iterator.210</td><td>if <em>first</em> and <em>last</em> do not belong to the same JSON value; example: <code>"iterators do not fit"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity O(N*log(<a class="el" href="classnlohmann_1_1basic__json.html#aaa2519eb5a174547b8a2f6019def9b65" title="returns the number of elements">size()</a> + N)), where N is the number of elements to insert.</p>
<p>@liveexample{The example shows how <code><a class="el" href="classnlohmann_1_1basic__json.html#a6c02637be3d8bd730a14082cc05f7a85" title="updates a JSON object from another object, overwriting existing keys">update()</a></code> is used__range.,update}</p>
<dl class="section see"><dt>See also</dt><dd><a href="https://docs.python.org/3.6/library/stdtypes.html#dict.update">https://docs.python.org/3.6/library/stdtypes.html#dict.update</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<a id="ade6945272c7b703520f435ad580d3c7f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ade6945272c7b703520f435ad580d3c7f">&#9670;&nbsp;</a></span>swap() <span class="overload">[1/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of the JSON value with those of <em>other</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>JSON value to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how JSON values can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__reference}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="adbb8131d4eaea460e8329bc0dfff1f6e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adbb8131d4eaea460e8329bc0dfff1f6e">&#9670;&nbsp;</a></span>swap() <span class="overload">[2/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a69524b1f8f42c0a81b86cee3fc54e034">array_t</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of a JSON array with those of <em>other</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>array to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.310</td><td>when JSON value is not an array; example: <code>"cannot
use swap() with string"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how arrays can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__array_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a02f73d65a38b3f0450c992e8c337d522"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02f73d65a38b3f0450c992e8c337d522">&#9670;&nbsp;</a></span>swap() <span class="overload">[3/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a949272bf6af5eb8eab9675505422f5b3">object_t</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of a JSON object with those of <em>other</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>object to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.310</td><td>when JSON value is not an object; example: <code>"cannot use swap() with string"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how objects can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__object_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a1c597d3cfa8aeec2ab4492306201851e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c597d3cfa8aeec2ab4492306201851e">&#9670;&nbsp;</a></span>swap() <span class="overload">[4/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#a561057a2cc70397ad0ab890745d1d7c7">string_t</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of a JSON string with those of <em>other</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>string to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.310</td><td>when JSON value is not a string; example: <code>"cannot
use swap() with boolean"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how strings can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__string_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="abe5adbae0da85a23ad7e812bdb85672f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe5adbae0da85a23ad7e812bdb85672f">&#9670;&nbsp;</a></span>swap() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#acbf51bc13484009ed204bd78a498355e">binary_t</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of a JSON string with those of <em>other</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">other</td><td>binary to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.310</td><td>when JSON value is not a string; example: <code>"cannot
use swap() with boolean"</code></td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how strings can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__binary_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.8.0 </dd></dl>
</div>
</div>
<a id="a02f1c7f2f2684292590294dccbbd7621"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02f1c7f2f2684292590294dccbbd7621">&#9670;&nbsp;</a></span>swap() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::swap </td>
<td>(</td>
<td class="paramtype">typename <a class="el" href="classnlohmann_1_1byte__container__with__subtype.html#a4d27e8633c5a5e3b49dd4ccb06515713">binary_t::container_type</a> &amp;&#160;</td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
</div>
</div>
<a id="a633db4570bf0afb137dec11a2439acee"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a633db4570bf0afb137dec11a2439acee">&#9670;&nbsp;</a></span>parse() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::parse </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a>&#160;</td>
<td class="paramname"><em>cb</em> = <code>nullptr</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ignore_comments</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>deserialize from a compatible input </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">InputType</td><td>A compatible input, for instance<ul>
<li>an std::istream object</li>
<li>a FILE pointer</li>
<li>a C-style array of characters</li>
<li>a pointer to a null-terminated string of single byte characters</li>
<li>an object obj for which begin(obj) and end(obj) produces a valid pair of iterators.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>input to read from </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">cb</td><td>a parser callback function of type <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> which is used to control the deserialization by filtering unwanted values (optional) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ignore_comments</td><td>whether comments should be ignored and treated like whitespace (true) or yield a parse error (true); (optional, false by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.101</td><td>if a parse error occurs; example: <code>""unexpected end of input; expected string literal""</code> </td></tr>
<tr><td class="paramname">parse_error.102</td><td>if to_unicode fails or surrogate error </td></tr>
<tr><td class="paramname">parse_error.103</td><td>if to_unicode fails</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the length of the input. The parser is a predictive LL(1) parser. The complexity can be higher if the parser callback function <em>cb</em> or reading from the input <em>i</em> has a super-linear complexity.</p>
<dl class="section note"><dt>Note</dt><dd>A UTF-8 byte order mark is silently ignored.</dd></dl>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse()</a></code> function reading from an array.,parse__array__parser_callback_t}</p>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse()</a></code> function with and without callback function.,parse__string__parser_callback_t}</p>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse()</a></code> function with and without callback function.,parse__istream__parser_callback_t}</p>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a633db4570bf0afb137dec11a2439acee" title="deserialize from a compatible input">parse()</a></code> function reading from a contiguous container.,parse__contiguouscontainer__parser_callback_t}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.3 (contiguous containers); version 3.9.0 allowed to ignore comments. </dd></dl>
</div>
</div>
<a id="ab7470dfe956c4e70ea54a22e5ca32eab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab7470dfe956c4e70ea54a22e5ca32eab">&#9670;&nbsp;</a></span>parse() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IteratorType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::parse </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a>&#160;</td>
<td class="paramname"><em>cb</em> = <code>nullptr</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ignore_comments</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>deserialize from a pair of character iterators </p>
<p>The value_type of the iterator must be a integral type with size of 1, 2 or 4 bytes, which will be interpreted respectively as UTF-8, UTF-16 and UTF-32.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">first</td><td>iterator to start of character range </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">last</td><td>iterator to end of character range </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">cb</td><td>a parser callback function of type <a class="el" href="classnlohmann_1_1basic__json.html#a87cd77e74fd386d93f26ad04bd01b6a5">parser_callback_t</a> which is used to control the deserialization by filtering unwanted values (optional) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ignore_comments</td><td>whether comments should be ignored and treated like whitespace (true) or yield a parse error (true); (optional, false by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.101</td><td>if a parse error occurs; example: <code>""unexpected end of input; expected string literal""</code> </td></tr>
<tr><td class="paramname">parse_error.102</td><td>if to_unicode fails or surrogate error </td></tr>
<tr><td class="paramname">parse_error.103</td><td>if to_unicode fails </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a7fb5ed7fb021ad10238cb57937f07d50"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fb5ed7fb021ad10238cb57937f07d50">&#9670;&nbsp;</a></span>accept()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool nlohmann::basic_json::accept </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ignore_comments</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>check if the input is valid JSON </p>
<p>Unlike the parse(InputType&amp;&amp;, const parser_callback_t,const bool) function, this function neither throws an exception in case of invalid JSON input (i.e., a parse error) nor creates diagnostic information.</p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
<table class="tparams">
<tr><td class="paramname">InputType</td><td>A compatible input, for instance<ul>
<li>an std::istream object</li>
<li>a FILE pointer</li>
<li>a C-style array of characters</li>
<li>a pointer to a null-terminated string of single byte characters</li>
<li>an object obj for which begin(obj) and end(obj) produces a valid pair of iterators.</li>
</ul>
</td></tr>
</table>
</dd>
</dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>input to read from </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ignore_comments</td><td>whether comments should be ignored and treated like whitespace (true) or yield a parse error (true); (optional, false by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Whether the input read from <em>i</em> is valid JSON.</dd></dl>
<p>@complexity Linear in the length of the input. The parser is a predictive LL(1) parser.</p>
<dl class="section note"><dt>Note</dt><dd>A UTF-8 byte order mark is silently ignored.</dd></dl>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a7fb5ed7fb021ad10238cb57937f07d50" title="check if the input is valid JSON">accept()</a></code> function reading from a string.,accept__string} </p>
</div>
</div>
<a id="a21dc71dda1df5d840625c360329e69fe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a21dc71dda1df5d840625c360329e69fe">&#9670;&nbsp;</a></span>sax_parse()</h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType , typename SAX &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool nlohmann::basic_json::sax_parse </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">SAX *&#160;</td>
<td class="paramname"><em>sax</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespacenlohmann_1_1detail.html#aa554fc6a11519e4f347deb25a9f0db40">input_format_t</a>&#160;</td>
<td class="paramname"><em>format</em> = <code>input_format_t::json</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>ignore_comments</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>generate SAX events </p>
<p>The SAX event lister must follow the interface of <a class="el" href="structnlohmann_1_1json__sax.html">json_sax</a>.</p>
<p>This function reads from a compatible input. Examples are:</p><ul>
<li>an std::istream object</li>
<li>a FILE pointer</li>
<li>a C-style array of characters</li>
<li>a pointer to a null-terminated string of single byte characters</li>
<li>an object obj for which begin(obj) and end(obj) produces a valid pair of iterators.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>input to read from </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">sax</td><td>SAX event listener </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">format</td><td>the format to parse (JSON, CBOR, MessagePack, or UBJSON) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strict</td><td>whether the input has to be consumed completely </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ignore_comments</td><td>whether comments should be ignored and treated like whitespace (true) or yield a parse error (true); (optional, false by default); only applies to the JSON file format.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>return value of the last processed SAX event</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.101</td><td>if a parse error occurs; example: <code>""unexpected end of input; expected string literal""</code> </td></tr>
<tr><td class="paramname">parse_error.102</td><td>if to_unicode fails or surrogate error </td></tr>
<tr><td class="paramname">parse_error.103</td><td>if to_unicode fails</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the length of the input. The parser is a predictive LL(1) parser. The complexity can be higher if the SAX consumer <em>sax</em> has a super-linear complexity.</p>
<dl class="section note"><dt>Note</dt><dd>A UTF-8 byte order mark is silently ignored.</dd></dl>
<p>@liveexample{The example below demonstrates the <code><a class="el" href="classnlohmann_1_1basic__json.html#a21dc71dda1df5d840625c360329e69fe" title="generate SAX events">sax_parse()</a></code> function reading from string and processing the events with a user-defined SAX event consumer.,sax_parse}</p>
<dl class="section since"><dt>Since</dt><dd>version 3.2.0 </dd></dl>
</div>
</div>
<a id="a0fb9647ea72df0a3099cf6dd7e3f53e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0fb9647ea72df0a3099cf6dd7e3f53e9">&#9670;&nbsp;</a></span>type_name()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">const JSON_HEDLEY_RETURNS_NON_NULL char* nlohmann::basic_json::type_name </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return the type as string </p>
<p>Returns the type name as string to be used in error messages - usually to indicate that a function was called on a wrong JSON type.</p>
<dl class="section return"><dt>Returns</dt><dd>a string representation of a the <em>m_type</em> member: <table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">Value type </th><th class="markdownTableHeadNone">return value </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>"null"</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>"boolean"</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>"string"</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number </td><td class="markdownTableBodyNone"><code>"number"</code> (for all number types) </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><code>"object"</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><code>"array"</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><code>"binary"</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">discarded </td><td class="markdownTableBodyNone"><code>"discarded"</code> </td></tr>
</table>
</dd></dl>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@complexity Constant.</p>
<p>@liveexample{The following code exemplifies <code><a class="el" href="classnlohmann_1_1basic__json.html#a0fb9647ea72df0a3099cf6dd7e3f53e9" title="return the type as string">type_name()</a></code> for all JSON types.,type_name}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">type()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> of the JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a568197da17e5f7f9889607a2524497c6">operator value_t()</a> &ndash; return the <a class="el" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00" title="return the type of the JSON value (explicit)">type</a> of the JSON <a class="el" href="classnlohmann_1_1basic__json.html#ab29a59d20767180d6d2fe4f5054dd245" title="access specified object element with default value">value</a> (implicit)</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0, public since 2.1.0, <code>const char*</code> and <code>noexcept</code> since 3.0.0 </dd></dl>
</div>
</div>
<a id="aa0345b54ea150f6f803444766832979a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0345b54ea150f6f803444766832979a">&#9670;&nbsp;</a></span>to_cbor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::vector&lt;uint8_t&gt; nlohmann::basic_json::to_cbor </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a CBOR serialization of a given JSON value </p>
<p>Serializes a given JSON value <em>j</em> to a byte vector using the CBOR (Concise Binary Object Representation) serialization format. CBOR is a binary serialization format which aims to be more compact than JSON itself, yet more efficient to parse.</p>
<p>The library uses the following mapping from JSON values types to CBOR types according to the CBOR specification (RFC 7049):</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">value/range </th><th class="markdownTableHeadNone">CBOR type </th><th class="markdownTableHeadNone">first byte </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">Null </td><td class="markdownTableBodyNone">0xF6 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone">True </td><td class="markdownTableBodyNone">0xF5 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone">False </td><td class="markdownTableBodyNone">0xF4 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-9223372036854775808..-2147483649 </td><td class="markdownTableBodyNone">Negative integer (8 bytes follow) </td><td class="markdownTableBodyNone">0x3B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-2147483648..-32769 </td><td class="markdownTableBodyNone">Negative integer (4 bytes follow) </td><td class="markdownTableBodyNone">0x3A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-32768..-129 </td><td class="markdownTableBodyNone">Negative integer (2 bytes follow) </td><td class="markdownTableBodyNone">0x39 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-128..-25 </td><td class="markdownTableBodyNone">Negative integer (1 byte follow) </td><td class="markdownTableBodyNone">0x38 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-24..-1 </td><td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">0x20..0x37 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0..23 </td><td class="markdownTableBodyNone">Integer </td><td class="markdownTableBodyNone">0x00..0x17 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">24..255 </td><td class="markdownTableBodyNone">Unsigned integer (1 byte follow) </td><td class="markdownTableBodyNone">0x18 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">256..65535 </td><td class="markdownTableBodyNone">Unsigned integer (2 bytes follow) </td><td class="markdownTableBodyNone">0x19 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">65536..4294967295 </td><td class="markdownTableBodyNone">Unsigned integer (4 bytes follow) </td><td class="markdownTableBodyNone">0x1A </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">Unsigned integer (8 bytes follow) </td><td class="markdownTableBodyNone">0x1B </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0..23 </td><td class="markdownTableBodyNone">Integer </td><td class="markdownTableBodyNone">0x00..0x17 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">24..255 </td><td class="markdownTableBodyNone">Unsigned integer (1 byte follow) </td><td class="markdownTableBodyNone">0x18 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">256..65535 </td><td class="markdownTableBodyNone">Unsigned integer (2 bytes follow) </td><td class="markdownTableBodyNone">0x19 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">65536..4294967295 </td><td class="markdownTableBodyNone">Unsigned integer (4 bytes follow) </td><td class="markdownTableBodyNone">0x1A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">Unsigned integer (8 bytes follow) </td><td class="markdownTableBodyNone">0x1B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value representable by a float</em> </td><td class="markdownTableBodyNone">Single-Precision Float </td><td class="markdownTableBodyNone">0xFA </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value NOT representable by a float</em> </td><td class="markdownTableBodyNone">Double-Precision Float </td><td class="markdownTableBodyNone">0xFB </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 0..23 </td><td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">0x60..0x77 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 23..255 </td><td class="markdownTableBodyNone">UTF-8 string (1 byte follow) </td><td class="markdownTableBodyNone">0x78 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 256..65535 </td><td class="markdownTableBodyNone">UTF-8 string (2 bytes follow) </td><td class="markdownTableBodyNone">0x79 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">UTF-8 string (4 bytes follow) </td><td class="markdownTableBodyNone">0x7A </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">UTF-8 string (8 bytes follow) </td><td class="markdownTableBodyNone">0x7B </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 0..23 </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x80..0x97 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 23..255 </td><td class="markdownTableBodyNone">array (1 byte follow) </td><td class="markdownTableBodyNone">0x98 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 256..65535 </td><td class="markdownTableBodyNone">array (2 bytes follow) </td><td class="markdownTableBodyNone">0x99 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">array (4 bytes follow) </td><td class="markdownTableBodyNone">0x9A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">array (8 bytes follow) </td><td class="markdownTableBodyNone">0x9B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 0..23 </td><td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">0xA0..0xB7 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 23..255 </td><td class="markdownTableBodyNone">map (1 byte follow) </td><td class="markdownTableBodyNone">0xB8 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 256..65535 </td><td class="markdownTableBodyNone">map (2 bytes follow) </td><td class="markdownTableBodyNone">0xB9 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">map (4 bytes follow) </td><td class="markdownTableBodyNone">0xBA </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">map (8 bytes follow) </td><td class="markdownTableBodyNone">0xBB </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 0..23 </td><td class="markdownTableBodyNone">byte string </td><td class="markdownTableBodyNone">0x40..0x57 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 23..255 </td><td class="markdownTableBodyNone">byte string (1 byte follow) </td><td class="markdownTableBodyNone">0x58 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 256..65535 </td><td class="markdownTableBodyNone">byte string (2 bytes follow) </td><td class="markdownTableBodyNone">0x59 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">byte string (4 bytes follow) </td><td class="markdownTableBodyNone">0x5A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">byte string (8 bytes follow) </td><td class="markdownTableBodyNone">0x5B </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The mapping is <b>complete</b> in the sense that any JSON value type can be converted to a CBOR value.</dd>
<dd>
If NaN or Infinity are stored inside a JSON number, they are serialized properly. This behavior differs from the <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump()</a> function which serializes NaN or Infinity to <code>null</code>.</dd>
<dd>
The following CBOR types are not used in the conversion:<ul>
<li>UTF-8 strings terminated by "break" (0x7F)</li>
<li>arrays terminated by "break" (0x9F)</li>
<li>maps terminated by "break" (0xBF)</li>
<li>byte strings terminated by "break" (0x5F)</li>
<li>date/time (0xC0..0xC1)</li>
<li>bignum (0xC2..0xC3)</li>
<li>decimal fraction (0xC4)</li>
<li>bigfloat (0xC5)</li>
<li>expected conversions (0xD5..0xD7)</li>
<li>simple values (0xE0..0xF3, 0xF8)</li>
<li>undefined (0xF7)</li>
<li>half-precision floats (0xF9)</li>
<li>break (0xFF)</li>
</ul>
</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON value to serialize </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CBOR serialization as byte vector</dd></dl>
<p>@complexity Linear in the size of the JSON value <em>j</em>.</p>
<p>@liveexample{The example shows the serialization of a JSON value to a byte vector in CBOR format.,to_cbor}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://cbor.io">http://cbor.io</a> </dd>
<dd>
from_cbor(detail::input_adapter&amp;&amp;, const bool, const bool, const cbor_tag_handler_t) for the analogous deserialization </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack(const basic_json&amp;)</a> for the related MessagePack format </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson(const basic_json&amp;, const bool, const bool)</a> for the related UBJSON format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.9; compact representation of floating-point numbers since version 3.8.0 </dd></dl>
</div>
</div>
<a id="aac4398704ac872368c735b40738ae1c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aac4398704ac872368c735b40738ae1c4">&#9670;&nbsp;</a></span>to_msgpack()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::vector&lt;uint8_t&gt; nlohmann::basic_json::to_msgpack </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a MessagePack serialization of a given JSON value </p>
<p>Serializes a given JSON value <em>j</em> to a byte vector using the MessagePack serialization format. MessagePack is a binary serialization format which aims to be more compact than JSON itself, yet more efficient to parse.</p>
<p>The library uses the following mapping from JSON values types to MessagePack types according to the MessagePack specification:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">value/range </th><th class="markdownTableHeadNone">MessagePack type </th><th class="markdownTableHeadNone">first byte </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">nil </td><td class="markdownTableBodyNone">0xC0 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone">true </td><td class="markdownTableBodyNone">0xC3 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone">false </td><td class="markdownTableBodyNone">0xC2 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-9223372036854775808..-2147483649 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone">0xD3 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-2147483648..-32769 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone">0xD2 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-32768..-129 </td><td class="markdownTableBodyNone">int16 </td><td class="markdownTableBodyNone">0xD1 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-128..-33 </td><td class="markdownTableBodyNone">int8 </td><td class="markdownTableBodyNone">0xD0 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-32..-1 </td><td class="markdownTableBodyNone">negative fixint </td><td class="markdownTableBodyNone">0xE0..0xFF </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0..127 </td><td class="markdownTableBodyNone">positive fixint </td><td class="markdownTableBodyNone">0x00..0x7F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">128..255 </td><td class="markdownTableBodyNone">uint 8 </td><td class="markdownTableBodyNone">0xCC </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">256..65535 </td><td class="markdownTableBodyNone">uint 16 </td><td class="markdownTableBodyNone">0xCD </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">65536..4294967295 </td><td class="markdownTableBodyNone">uint 32 </td><td class="markdownTableBodyNone">0xCE </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">uint 64 </td><td class="markdownTableBodyNone">0xCF </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0..127 </td><td class="markdownTableBodyNone">positive fixint </td><td class="markdownTableBodyNone">0x00..0x7F </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">128..255 </td><td class="markdownTableBodyNone">uint 8 </td><td class="markdownTableBodyNone">0xCC </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">256..65535 </td><td class="markdownTableBodyNone">uint 16 </td><td class="markdownTableBodyNone">0xCD </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">65536..4294967295 </td><td class="markdownTableBodyNone">uint 32 </td><td class="markdownTableBodyNone">0xCE </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">4294967296..18446744073709551615 </td><td class="markdownTableBodyNone">uint 64 </td><td class="markdownTableBodyNone">0xCF </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value representable by a float</em> </td><td class="markdownTableBodyNone">float 32 </td><td class="markdownTableBodyNone">0xCA </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value NOT representable by a float</em> </td><td class="markdownTableBodyNone">float 64 </td><td class="markdownTableBodyNone">0xCB </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 0..31 </td><td class="markdownTableBodyNone">fixstr </td><td class="markdownTableBodyNone">0xA0..0xBF </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 32..255 </td><td class="markdownTableBodyNone">str 8 </td><td class="markdownTableBodyNone">0xD9 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 256..65535 </td><td class="markdownTableBodyNone">str 16 </td><td class="markdownTableBodyNone">0xDA </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>length</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">str 32 </td><td class="markdownTableBodyNone">0xDB </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 0..15 </td><td class="markdownTableBodyNone">fixarray </td><td class="markdownTableBodyNone">0x90..0x9F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 16..65535 </td><td class="markdownTableBodyNone">array 16 </td><td class="markdownTableBodyNone">0xDC </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">array 32 </td><td class="markdownTableBodyNone">0xDD </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 0..15 </td><td class="markdownTableBodyNone">fix map </td><td class="markdownTableBodyNone">0x80..0x8F </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 16..65535 </td><td class="markdownTableBodyNone">map 16 </td><td class="markdownTableBodyNone">0xDE </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">map 32 </td><td class="markdownTableBodyNone">0xDF </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 0..255 </td><td class="markdownTableBodyNone">bin 8 </td><td class="markdownTableBodyNone">0xC4 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 256..65535 </td><td class="markdownTableBodyNone">bin 16 </td><td class="markdownTableBodyNone">0xC5 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>size</em>: 65536..4294967295 </td><td class="markdownTableBodyNone">bin 32 </td><td class="markdownTableBodyNone">0xC6 </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The mapping is <b>complete</b> in the sense that any JSON value type can be converted to a MessagePack value.</dd>
<dd>
The following values can <b>not</b> be converted to a MessagePack value:<ul>
<li>strings with more than 4294967295 bytes</li>
<li>byte strings with more than 4294967295 bytes</li>
<li>arrays with more than 4294967295 elements</li>
<li>objects with more than 4294967295 elements</li>
</ul>
</dd>
<dd>
Any MessagePack output created <a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack</a> can be successfully parsed by <a class="el" href="classnlohmann_1_1basic__json.html#a5d4c61976353f72d2baf8a382936abe4">from_msgpack</a>.</dd>
<dd>
If NaN or Infinity are stored inside a JSON number, they are serialized properly. This behavior differs from the <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump()</a> function which serializes NaN or Infinity to <code>null</code>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON value to serialize </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>MessagePack serialization as byte vector</dd></dl>
<p>@complexity Linear in the size of the JSON value <em>j</em>.</p>
<p>@liveexample{The example shows the serialization of a JSON value to a byte vector in MessagePack format.,to_msgpack}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://msgpack.org">http://msgpack.org</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a5d4c61976353f72d2baf8a382936abe4">from_msgpack</a> for the analogous deserialization </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor</a>(const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp; for the related CBOR format </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson(const basic_json&amp;, const bool, const bool)</a> for the related UBJSON format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.9 </dd></dl>
</div>
</div>
<a id="ad87e7cef6373d292b8c6f471c87bfb34"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad87e7cef6373d292b8c6f471c87bfb34">&#9670;&nbsp;</a></span>to_ubjson()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::vector&lt;uint8_t&gt; nlohmann::basic_json::to_ubjson </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>use_size</em> = <code>false</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>use_type</em> = <code>false</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a UBJSON serialization of a given JSON value </p>
<p>Serializes a given JSON value <em>j</em> to a byte vector using the UBJSON (Universal Binary JSON) serialization format. UBJSON aims to be more compact than JSON itself, yet more efficient to parse.</p>
<p>The library uses the following mapping from JSON values types to UBJSON types according to the UBJSON specification:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">value/range </th><th class="markdownTableHeadNone">UBJSON type </th><th class="markdownTableHeadNone">marker </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>Z</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone">true </td><td class="markdownTableBodyNone"><code>T</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone">false </td><td class="markdownTableBodyNone"><code>F</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-9223372036854775808..-2147483649 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone"><code>L</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-2147483648..-32769 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone"><code>l</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-32768..-129 </td><td class="markdownTableBodyNone">int16 </td><td class="markdownTableBodyNone"><code>I</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-128..127 </td><td class="markdownTableBodyNone">int8 </td><td class="markdownTableBodyNone"><code>i</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">128..255 </td><td class="markdownTableBodyNone">uint8 </td><td class="markdownTableBodyNone"><code>U</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">256..32767 </td><td class="markdownTableBodyNone">int16 </td><td class="markdownTableBodyNone"><code>I</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">32768..2147483647 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone"><code>l</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">2147483648..9223372036854775807 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone"><code>L</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0..127 </td><td class="markdownTableBodyNone">int8 </td><td class="markdownTableBodyNone"><code>i</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">128..255 </td><td class="markdownTableBodyNone">uint8 </td><td class="markdownTableBodyNone"><code>U</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">256..32767 </td><td class="markdownTableBodyNone">int16 </td><td class="markdownTableBodyNone"><code>I</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">32768..2147483647 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone"><code>l</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">2147483648..9223372036854775807 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone"><code>L</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">2147483649..18446744073709551615 </td><td class="markdownTableBodyNone">high-precision </td><td class="markdownTableBodyNone"><code>H</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">float64 </td><td class="markdownTableBodyNone"><code>D</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>with shortest length indicator</em> </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>S</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>see notes on optimized format</em> </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><code>[</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>see notes on optimized format</em> </td><td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone"><code>{</code> </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The mapping is <b>complete</b> in the sense that any JSON value type can be converted to a UBJSON value.</dd>
<dd>
The following values can <b>not</b> be converted to a UBJSON value:<ul>
<li>strings with more than 9223372036854775807 bytes (theoretical)</li>
</ul>
</dd>
<dd>
The following markers are not used in the conversion:<ul>
<li><code>Z</code>: no-op values are not created.</li>
<li><code>C</code>: single-byte strings are serialized with <code>S</code> markers.</li>
</ul>
</dd>
<dd>
Any UBJSON output created <a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson</a> can be successfully parsed by <a class="el" href="classnlohmann_1_1basic__json.html#a423ea903bcbe9c52bbdb8084f212293c">from_ubjson</a>.</dd>
<dd>
If NaN or Infinity are stored inside a JSON number, they are serialized properly. This behavior differs from the <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump()</a> function which serializes NaN or Infinity to <code>null</code>.</dd>
<dd>
The optimized formats for containers are supported: Parameter <em>use_size</em> adds size information to the beginning of a container and removes the closing marker. Parameter <em>use_type</em> further checks whether all elements of a container have the same type and adds the type marker to the beginning of the container. The <em>use_type</em> parameter must only be used together with <em>use_size</em> = true. Note that <em>use_size</em> = true alone may result in larger representations - the benefit of this parameter is that the receiving side is immediately informed on the number of elements of the container.</dd>
<dd>
If the JSON data contains the binary type, the value stored is a list of integers, as suggested by the UBJSON documentation. In particular, this means that serialization and the deserialization of a JSON containing binary values into UBJSON and back will result in a different JSON object.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON value to serialize </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">use_size</td><td>whether to add size annotations to container types </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">use_type</td><td>whether to add type annotations to container types (must be combined with <em>use_size</em> = true) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>UBJSON serialization as byte vector</dd></dl>
<p>@complexity Linear in the size of the JSON value <em>j</em>.</p>
<p>@liveexample{The example shows the serialization of a JSON value to a byte vector in UBJSON format.,to_ubjson}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://ubjson.org">http://ubjson.org</a> </dd>
<dd>
from_ubjson(detail::input_adapter&amp;&amp;, const bool, const bool) for the analogous deserialization </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor</a>(const <a class="el" href="classnlohmann_1_1basic__json.html" title="a class to store JSON values">basic_json</a>&amp; for the related CBOR format </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack(const basic_json&amp;)</a> for the related MessagePack format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.1.0 </dd></dl>
</div>
</div>
<a id="a2dc8fd9d856f74a16a7b4f284571775a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2dc8fd9d856f74a16a7b4f284571775a">&#9670;&nbsp;</a></span>to_bson() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static std::vector&lt;uint8_t&gt; nlohmann::basic_json::to_bson </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Serializes the given JSON object <code>j</code> to BSON and returns a vector containing the corresponding BSON-representation. </p>
<p>BSON (Binary JSON) is a binary format in which zero or more ordered key/value pairs are stored as a single entity (a so-called document).</p>
<p>The library uses the following mapping from JSON values types to BSON types:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">value/range </th><th class="markdownTableHeadNone">BSON type </th><th class="markdownTableHeadNone">marker </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone">0x0A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone"><code>true</code>, <code>false</code> </td><td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone">0x08 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-9223372036854775808..-2147483649 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone">0x12 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">-2147483648..2147483647 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone">0x10 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">2147483648..9223372036854775807 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone">0x12 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0..2147483647 </td><td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone">0x10 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">2147483648..9223372036854775807 </td><td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone">0x12 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">9223372036854775808..18446744073709551615 </td><td class="markdownTableBodyNone">&ndash; </td><td class="markdownTableBodyNone">&ndash; </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">double </td><td class="markdownTableBodyNone">0x01 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x02 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">document </td><td class="markdownTableBodyNone">0x04 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">document </td><td class="markdownTableBodyNone">0x03 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone"><em>any value</em> </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x05 </td></tr>
</table>
<dl class="section warning"><dt>Warning</dt><dd>The mapping is <b>incomplete</b>, since only JSON-objects (and things contained therein) can be serialized to BSON. Also, integers larger than 9223372036854775807 cannot be serialized to BSON, and the keys may not contain U+0000, since they are serialized a zero-terminated c-strings.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">out_of_range.407</td><td>if <code>j.is_number_unsigned() &amp;&amp; j.get&lt;std::uint64_t&gt;() &gt; 9223372036854775807</code> </td></tr>
<tr><td class="paramname">out_of_range.409</td><td>if a key in <code>j</code> contains a NULL (U+0000) </td></tr>
<tr><td class="paramname">type_error.317</td><td>if <code>!j.<a class="el" href="classnlohmann_1_1basic__json.html#ae3300a95d3bb4a55cb0e04b9f125e42f" title="return whether value is an object">is_object()</a></code></td></tr>
</table>
</dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>The input <code>j</code> is required to be an object: <code>j.is_object() == true</code>.</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Any BSON output created via <a class="el" href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">to_bson</a> can be successfully parsed by <a class="el" href="classnlohmann_1_1basic__json.html#a7f92545f5bd388d529df7eb27c09b5e8">from_bson</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON value to serialize </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>BSON serialization as byte vector</dd></dl>
<p>@complexity Linear in the size of the JSON value <em>j</em>.</p>
<p>@liveexample{The example shows the serialization of a JSON value to a byte vector in BSON format.,to_bson}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://bsonspec.org/spec.html">http://bsonspec.org/spec.html</a> </dd>
<dd>
from_bson(detail::input_adapter&amp;&amp;, const bool strict) for the analogous deserialization </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson(const basic_json&amp;, const bool, const bool)</a> for the related UBJSON format </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor(const basic_json&amp;)</a> for the related CBOR format </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack(const basic_json&amp;)</a> for the related MessagePack format </dd></dl>
</div>
</div>
<a id="a0e352827765f76b007725d2b2b890d45"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e352827765f76b007725d2b2b890d45">&#9670;&nbsp;</a></span>to_bson() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void nlohmann::basic_json::to_bson </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">detail::output_adapter&lt; uint8_t &gt;&#160;</td>
<td class="paramname"><em>o</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Serializes the given JSON object <code>j</code> to BSON and forwards the corresponding BSON-representation to the given output_adapter <code>o</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">j</td><td>The JSON object to convert to BSON. </td></tr>
<tr><td class="paramname">o</td><td>The output adapter that receives the binary BSON representation. </td></tr>
</table>
</dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>The input <code>j</code> shall be an object: <code>j.is_object() == true</code> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">to_bson(const basic_json&amp;)</a> </dd></dl>
</div>
</div>
<a id="a09ed82d52ba52eae2dfaf7a338893fb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09ed82d52ba52eae2dfaf7a338893fb8">&#9670;&nbsp;</a></span>to_bson() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void nlohmann::basic_json::to_bson </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">detail::output_adapter&lt; char &gt;&#160;</td>
<td class="paramname"><em>o</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Serializes the given JSON object <code>j</code> to BSON and forwards the corresponding BSON-representation to the given output_adapter <code>o</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">j</td><td>The JSON object to convert to BSON. </td></tr>
<tr><td class="paramname">o</td><td>The output adapter that receives the binary BSON representation. </td></tr>
</table>
</dd>
</dl>
<dl class="section pre"><dt>Precondition</dt><dd>The input <code>j</code> shall be an object: <code>j.is_object() == true</code> </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">to_bson(const basic_json&amp;)</a> </dd></dl>
</div>
</div>
<a id="ac771f2c2d0b16f59bc066db900963ba1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac771f2c2d0b16f59bc066db900963ba1">&#9670;&nbsp;</a></span>from_cbor() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_cbor </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a>&#160;</td>
<td class="paramname"><em>tag_handler</em> = <code><a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a JSON value from an input in CBOR format </p>
<p>Deserializes a given input <em>i</em> to a JSON value using the CBOR (Concise Binary Object Representation) serialization format.</p>
<p>The library maps CBOR types to JSON value types as follows:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">CBOR type </th><th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">first byte </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Integer </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x00..0x17 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Unsigned integer </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x18 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Unsigned integer </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x19 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Unsigned integer </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x1A </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Unsigned integer </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x1B </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0x20..0x37 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0x38 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0x39 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0x3A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Negative integer </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0x3B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Byte string </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x40..0x57 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Byte string </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x58 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Byte string </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x59 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Byte string </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x5A </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Byte string </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x5B </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x60..0x77 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x78 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x79 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x7A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x7B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">UTF-8 string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x7F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x80..0x97 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x98 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x99 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x9A </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x9B </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x9F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xA0..0xB7 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xB8 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xB9 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xBA </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xBB </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">map </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xBF </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">False </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone">0xF4 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">True </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone">0xF5 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">0xF6 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Half-Precision Float </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone">0xF9 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Single-Precision Float </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone">0xFA </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Double-Precision Float </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone">0xFB </td></tr>
</table>
<dl class="section warning"><dt>Warning</dt><dd>The mapping is <b>incomplete</b> in the sense that not all CBOR types can be converted to a JSON value. The following CBOR types are not supported and will yield parse errors (parse_error.112):<ul>
<li>date/time (0xC0..0xC1)</li>
<li>bignum (0xC2..0xC3)</li>
<li>decimal fraction (0xC4)</li>
<li>bigfloat (0xC5)</li>
<li>expected conversions (0xD5..0xD7)</li>
<li>simple values (0xE0..0xF3, 0xF8)</li>
<li>undefined (0xF7)</li>
</ul>
</dd>
<dd>
CBOR allows map keys of any type, whereas JSON only allows strings as keys in object values. Therefore, CBOR maps with keys other than UTF-8 strings are rejected (parse_error.113).</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Any CBOR output created <a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor</a> can be successfully parsed by <a class="el" href="classnlohmann_1_1basic__json.html#ac771f2c2d0b16f59bc066db900963ba1">from_cbor</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>an input in CBOR format convertible to an input adapter </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strict</td><td>whether to expect the input to be consumed until EOF (true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">tag_handler</td><td>how to treat CBOR tags (optional, error by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.110</td><td>if the given input ends prematurely or the end of file was not reached when <em>strict</em> was set to true </td></tr>
<tr><td class="paramname">parse_error.112</td><td>if unsupported features from CBOR were used in the given input <em>v</em> or if the input is not valid CBOR </td></tr>
<tr><td class="paramname">parse_error.113</td><td>if a string was expected as map key, but not found</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the input <em>i</em>.</p>
<p>@liveexample{The example shows the deserialization of a byte vector in CBOR format to a JSON value.,from_cbor}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://cbor.io">http://cbor.io</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aa0345b54ea150f6f803444766832979a">to_cbor(const basic_json&amp;)</a> for the analogous serialization </dd>
<dd>
from_msgpack(detail::input_adapter&amp;&amp;, const bool, const bool) for the related MessagePack format </dd>
<dd>
from_ubjson(detail::input_adapter&amp;&amp;, const bool, const bool) for the related UBJSON format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.9; parameter <em>start_index</em> since 2.1.1; changed to consume input adapters, removed start_index parameter, and added <em>strict</em> parameter since 3.0.0; added <em>allow_exceptions</em> parameter since 3.2.0; added <em>tag_handler</em> parameter since 3.9.0. </dd></dl>
</div>
</div>
<a id="afcb83dba9c83a73524cc28812db2abd4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcb83dba9c83a73524cc28812db2abd4">&#9670;&nbsp;</a></span>from_cbor() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IteratorType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_cbor </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9ac">cbor_tag_handler_t</a>&#160;</td>
<td class="paramname"><em>tag_handler</em> = <code><a class="el" href="namespacenlohmann_1_1detail.html#a58bb1ef1a9ad287a9cfaf1855784d9acacb5e100e5a9a3e7f6d1fd97512215282">cbor_tag_handler_t::error</a></code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
</div>
</div>
<a id="a5d4c61976353f72d2baf8a382936abe4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d4c61976353f72d2baf8a382936abe4">&#9670;&nbsp;</a></span>from_msgpack() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_msgpack </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a JSON value from an input in MessagePack format </p>
<p>Deserializes a given input <em>i</em> to a JSON value using the MessagePack serialization format.</p>
<p>The library maps MessagePack types to JSON value types as follows:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">MessagePack type </th><th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">first byte </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">positive fixint </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0x00..0x7F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">fixmap </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0x80..0x8F </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">fixarray </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x90..0x9F </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">fixstr </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0xA0..0xBF </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">nil </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone">0xC0 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">false </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone">0xC2 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">true </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone">0xC3 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">float 32 </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone">0xCA </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">float 64 </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone">0xCB </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">uint 8 </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0xCC </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">uint 16 </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0xCD </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">uint 32 </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0xCE </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">uint 64 </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone">0xCF </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">int 8 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0xD0 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">int 16 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0xD1 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">int 32 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0xD2 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">int 64 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0xD3 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">str 8 </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0xD9 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">str 16 </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0xDA </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">str 32 </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0xDB </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array 16 </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0xDC </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array 32 </td><td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0xDD </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">map 16 </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xDE </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">map 32 </td><td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">0xDF </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">bin 8 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC4 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">bin 16 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC5 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">bin 32 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC6 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">ext 8 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC7 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">ext 16 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC8 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">ext 32 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xC9 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">fixext 1 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xD4 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">fixext 2 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xD5 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">fixext 4 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xD6 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">fixext 8 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xD7 </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">fixext 16 </td><td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0xD8 </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">negative fixint </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone">0xE0-0xFF </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>Any MessagePack output created <a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack</a> can be successfully parsed by <a class="el" href="classnlohmann_1_1basic__json.html#a5d4c61976353f72d2baf8a382936abe4">from_msgpack</a>.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>an input in MessagePack format convertible to an input adapter </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strict</td><td>whether to expect the input to be consumed until EOF (true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.110</td><td>if the given input ends prematurely or the end of file was not reached when <em>strict</em> was set to true </td></tr>
<tr><td class="paramname">parse_error.112</td><td>if unsupported features from MessagePack were used in the given input <em>i</em> or if the input is not valid MessagePack </td></tr>
<tr><td class="paramname">parse_error.113</td><td>if a string was expected as map key, but not found</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the input <em>i</em>.</p>
<p>@liveexample{The example shows the deserialization of a byte vector in MessagePack format to a JSON value.,from_msgpack}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://msgpack.org">http://msgpack.org</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#aac4398704ac872368c735b40738ae1c4">to_msgpack(const basic_json&amp;)</a> for the analogous serialization </dd>
<dd>
from_cbor(detail::input_adapter&amp;&amp;, const bool, const bool, const cbor_tag_handler_t) for the related CBOR format </dd>
<dd>
from_ubjson(detail::input_adapter&amp;&amp;, const bool, const bool) for the related UBJSON format </dd>
<dd>
from_bson(detail::input_adapter&amp;&amp;, const bool, const bool) for the related BSON format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.9; parameter <em>start_index</em> since 2.1.1; changed to consume input adapters, removed start_index parameter, and added <em>strict</em> parameter since 3.0.0; added <em>allow_exceptions</em> parameter since 3.2.0 </dd></dl>
</div>
</div>
<a id="abe8f728998a65ebe269931a80fd403d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abe8f728998a65ebe269931a80fd403d8">&#9670;&nbsp;</a></span>from_msgpack() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IteratorType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_msgpack </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
</div>
</div>
<a id="a423ea903bcbe9c52bbdb8084f212293c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a423ea903bcbe9c52bbdb8084f212293c">&#9670;&nbsp;</a></span>from_ubjson() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_ubjson </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>create a JSON value from an input in UBJSON format </p>
<p>Deserializes a given input <em>i</em> to a JSON value using the UBJSON (Universal Binary JSON) serialization format.</p>
<p>The library maps UBJSON types to JSON value types as follows:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">UBJSON type </th><th class="markdownTableHeadNone">JSON value type </th><th class="markdownTableHeadNone">marker </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">no-op </td><td class="markdownTableBodyNone"><em>no value, next value is read</em> </td><td class="markdownTableBodyNone"><code>N</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone"><code>null</code> </td><td class="markdownTableBodyNone"><code>Z</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">false </td><td class="markdownTableBodyNone"><code>false</code> </td><td class="markdownTableBodyNone"><code>F</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">true </td><td class="markdownTableBodyNone"><code>true</code> </td><td class="markdownTableBodyNone"><code>T</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">float32 </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><code>d</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">float64 </td><td class="markdownTableBodyNone">number_float </td><td class="markdownTableBodyNone"><code>D</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">uint8 </td><td class="markdownTableBodyNone">number_unsigned </td><td class="markdownTableBodyNone"><code>U</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">int8 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone"><code>i</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">int16 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone"><code>I</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone"><code>l</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">int64 </td><td class="markdownTableBodyNone">number_integer </td><td class="markdownTableBodyNone"><code>L</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">high-precision number </td><td class="markdownTableBodyNone">number_integer, number_unsigned, or number_float - depends on number string </td><td class="markdownTableBodyNone">'H' </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>S</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">char </td><td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone"><code>C</code> </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">array (optimized values are supported) </td><td class="markdownTableBodyNone"><code>[</code> </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">object </td><td class="markdownTableBodyNone">object (optimized values are supported) </td><td class="markdownTableBodyNone"><code>{</code> </td></tr>
</table>
<dl class="section note"><dt>Note</dt><dd>The mapping is <b>complete</b> in the sense that any UBJSON value can be converted to a JSON value.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>an input in UBJSON format convertible to an input adapter </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strict</td><td>whether to expect the input to be consumed until EOF (true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.110</td><td>if the given input ends prematurely or the end of file was not reached when <em>strict</em> was set to true </td></tr>
<tr><td class="paramname">parse_error.112</td><td>if a parse error occurs </td></tr>
<tr><td class="paramname">parse_error.113</td><td>if a string could not be parsed successfully</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the input <em>i</em>.</p>
<p>@liveexample{The example shows the deserialization of a byte vector in UBJSON format to a JSON value.,from_ubjson}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://ubjson.org">http://ubjson.org</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ad87e7cef6373d292b8c6f471c87bfb34">to_ubjson(const basic_json&amp;, const bool, const bool)</a> for the analogous serialization </dd>
<dd>
from_cbor(detail::input_adapter&amp;&amp;, const bool, const bool, const cbor_tag_handler_t) for the related CBOR format </dd>
<dd>
from_msgpack(detail::input_adapter&amp;&amp;, const bool, const bool) for the related MessagePack format </dd>
<dd>
from_bson(detail::input_adapter&amp;&amp;, const bool, const bool) for the related BSON format</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.1.0; added <em>allow_exceptions</em> parameter since 3.2.0 </dd></dl>
</div>
</div>
<a id="aa5e9d5e42fda65ba1f1cb43e383dacf2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5e9d5e42fda65ba1f1cb43e383dacf2">&#9670;&nbsp;</a></span>from_ubjson() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IteratorType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_ubjson </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
</div>
</div>
<a id="a7f92545f5bd388d529df7eb27c09b5e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7f92545f5bd388d529df7eb27c09b5e8">&#9670;&nbsp;</a></span>from_bson() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename InputType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_bson </td>
<td>(</td>
<td class="paramtype">InputType &amp;&amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a JSON value from an input in BSON format. </p>
<p>Deserializes a given input <em>i</em> to a JSON value using the BSON (Binary JSON) serialization format.</p>
<p>The library maps BSON record types to JSON value types as follows:</p>
<table class="markdownTable">
<tr class="markdownTableHead">
<th class="markdownTableHeadNone">BSON type </th><th class="markdownTableHeadNone">BSON marker byte </th><th class="markdownTableHeadNone">JSON value type </th></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">double </td><td class="markdownTableBodyNone">0x01 </td><td class="markdownTableBodyNone">number_float </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">string </td><td class="markdownTableBodyNone">0x02 </td><td class="markdownTableBodyNone">string </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">document </td><td class="markdownTableBodyNone">0x03 </td><td class="markdownTableBodyNone">object </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">array </td><td class="markdownTableBodyNone">0x04 </td><td class="markdownTableBodyNone">array </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">binary </td><td class="markdownTableBodyNone">0x05 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">undefined </td><td class="markdownTableBodyNone">0x06 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">ObjectId </td><td class="markdownTableBodyNone">0x07 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">boolean </td><td class="markdownTableBodyNone">0x08 </td><td class="markdownTableBodyNone">boolean </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">UTC Date-Time </td><td class="markdownTableBodyNone">0x09 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">null </td><td class="markdownTableBodyNone">0x0A </td><td class="markdownTableBodyNone">null </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Regular Expr. </td><td class="markdownTableBodyNone">0x0B </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">DB Pointer </td><td class="markdownTableBodyNone">0x0C </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">JavaScript Code </td><td class="markdownTableBodyNone">0x0D </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Symbol </td><td class="markdownTableBodyNone">0x0E </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">JavaScript Code </td><td class="markdownTableBodyNone">0x0F </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">int32 </td><td class="markdownTableBodyNone">0x10 </td><td class="markdownTableBodyNone">number_integer </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Timestamp </td><td class="markdownTableBodyNone">0x11 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">128-bit decimal float </td><td class="markdownTableBodyNone">0x13 </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowOdd">
<td class="markdownTableBodyNone">Max Key </td><td class="markdownTableBodyNone">0x7F </td><td class="markdownTableBodyNone">still unsupported </td></tr>
<tr class="markdownTableRowEven">
<td class="markdownTableBodyNone">Min Key </td><td class="markdownTableBodyNone">0xFF </td><td class="markdownTableBodyNone">still unsupported </td></tr>
</table>
<dl class="section warning"><dt>Warning</dt><dd>The mapping is <b>incomplete</b>. The unsupported mappings are indicated in the table above.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">i</td><td>an input in BSON format convertible to an input adapter </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">strict</td><td>whether to expect the input to be consumed until EOF (true by default) </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">allow_exceptions</td><td>whether to throw exceptions in case of a parse error (optional, true by default)</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>deserialized JSON value; in case of a parse error and <em>allow_exceptions</em> set to <code>false</code>, the return value will be <a class="el" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985a94708897ec9db8647dfe695714c98e46" title="discarded by the parser callback function">value_t::discarded</a>.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.114</td><td>if an unsupported BSON record type is encountered</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the input <em>i</em>.</p>
<p>@liveexample{The example shows the deserialization of a byte vector in BSON format to a JSON value.,from_bson}</p>
<dl class="section see"><dt>See also</dt><dd><a href="http://bsonspec.org/spec.html">http://bsonspec.org/spec.html</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#a2dc8fd9d856f74a16a7b4f284571775a">to_bson(const basic_json&amp;)</a> for the analogous serialization </dd>
<dd>
from_cbor(detail::input_adapter&amp;&amp;, const bool, const bool, const cbor_tag_handler_t) for the related CBOR format </dd>
<dd>
from_msgpack(detail::input_adapter&amp;&amp;, const bool, const bool) for the related MessagePack format </dd>
<dd>
from_ubjson(detail::input_adapter&amp;&amp;, const bool, const bool) for the related UBJSON format </dd></dl>
</div>
</div>
<a id="ae370fb456fb268caab90714bfc724f31"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae370fb456fb268caab90714bfc724f31">&#9670;&nbsp;</a></span>from_bson() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename IteratorType &gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::from_bson </td>
<td>(</td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>first</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">IteratorType&#160;</td>
<td class="paramname"><em>last</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>strict</em> = <code>true</code>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const bool&#160;</td>
<td class="paramname"><em>allow_exceptions</em> = <code>true</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p></p>
</div>
</div>
<a id="a0d26844b03de9067a47752b138e28236"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0d26844b03de9067a47752b138e28236">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[7/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified element via JSON Pointer </p>
<p>Uses a JSON pointer to retrieve a reference to the respective JSON value. No bound checking is performed. Similar to <a class="el" href="classnlohmann_1_1basic__json.html#a05c86efa156004b090258c1469eab3fd">operator[]</a>(const typename object_t::key_type&amp;), <code>null</code> values are created in arrays and objects if necessary.</p>
<p>In particular:</p><ul>
<li>If the JSON pointer points to an object key that does not exist, it is created an filled with a <code>null</code> value before a reference to it is returned.</li>
<li>If the JSON pointer points to an array index that does not exist, it is created an filled with a <code>null</code> value before a reference to it is returned. All indices between the current maximum and the given index are also filled with <code>null</code>.</li>
<li>The special value <code>-</code> is treated as a synonym for the index past the end.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>a JSON pointer</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element pointed to by <em>ptr</em> </dd></dl>
<p>@complexity Constant.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.106</td><td>if an array index begins with '0' </td></tr>
<tr><td class="paramname">parse_error.109</td><td>if an array index was not a number </td></tr>
<tr><td class="paramname">out_of_range.404</td><td>if the JSON pointer can not be resolved</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The behavior is shown in the example.,operatorjson_pointer}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ac240ab334bd660975e601b0809c3f1bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac240ab334bd660975e601b0809c3f1bc">&#9670;&nbsp;</a></span>operator[]() <span class="overload">[8/8]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::operator[] </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified element via JSON Pointer </p>
<p>Uses a JSON pointer to retrieve a reference to the respective JSON value. No bound checking is performed. The function does not change the JSON value; no <code>null</code> values are created. In particular, the special value <code>-</code> yields an exception.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>JSON pointer to the desired element</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>const reference to the element pointed to by <em>ptr</em> </dd></dl>
<p>@complexity Constant.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.106</td><td>if an array index begins with '0' </td></tr>
<tr><td class="paramname">parse_error.109</td><td>if an array index was not a number </td></tr>
<tr><td class="paramname">out_of_range.402</td><td>if the array index '-' is used </td></tr>
<tr><td class="paramname">out_of_range.404</td><td>if the JSON pointer can not be resolved</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The behavior is shown in the example.,operatorjson_pointer_const}</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ac07f0518ba7a3af394d37d86753a9845"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac07f0518ba7a3af394d37d86753a9845">&#9670;&nbsp;</a></span>at() <span class="overload">[5/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified element via JSON Pointer </p>
<p>Returns a reference to the element at with specified JSON pointer <em>ptr</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>JSON pointer to the desired element</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element pointed to by <em>ptr</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.106</td><td>if an array index in the passed JSON pointer <em>ptr</em> begins with '0'. See example below.</td></tr>
<tr><td class="paramname">parse_error.109</td><td>if an array index in the passed JSON pointer <em>ptr</em> is not a number. See example below.</td></tr>
<tr><td class="paramname">out_of_range.401</td><td>if an array index in the passed JSON pointer <em>ptr</em> is out of range. See example below.</td></tr>
<tr><td class="paramname">out_of_range.402</td><td>if the array index '-' is used in the passed JSON pointer <em>ptr</em>. As <code>at</code> provides checked access (and no elements are implicitly inserted), the index '-' is always invalid. See example below.</td></tr>
<tr><td class="paramname">out_of_range.403</td><td>if the JSON pointer describes a key of an object which cannot be found. See example below.</td></tr>
<tr><td class="paramname">out_of_range.404</td><td>if the JSON pointer <em>ptr</em> can not be resolved. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0</dd></dl>
<p>@liveexample{The behavior is shown in the example.,at_json_pointer} </p>
</div>
</div>
<a id="a92a2e5bde3f9a1a548b367114e4794f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a92a2e5bde3f9a1a548b367114e4794f1">&#9670;&nbsp;</a></span>at() <span class="overload">[6/6]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> nlohmann::basic_json::at </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html#a352187a5ebf3cde865be1b833c18f208">json_pointer</a> &amp;&#160;</td>
<td class="paramname"><em>ptr</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>access specified element via JSON Pointer </p>
<p>Returns a const reference to the element at with specified JSON pointer <em>ptr</em>, with bounds checking.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">ptr</td><td>JSON pointer to the desired element</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>reference to the element pointed to by <em>ptr</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.106</td><td>if an array index in the passed JSON pointer <em>ptr</em> begins with '0'. See example below.</td></tr>
<tr><td class="paramname">parse_error.109</td><td>if an array index in the passed JSON pointer <em>ptr</em> is not a number. See example below.</td></tr>
<tr><td class="paramname">out_of_range.401</td><td>if an array index in the passed JSON pointer <em>ptr</em> is out of range. See example below.</td></tr>
<tr><td class="paramname">out_of_range.402</td><td>if the array index '-' is used in the passed JSON pointer <em>ptr</em>. As <code>at</code> provides checked access (and no elements are implicitly inserted), the index '-' is always invalid. See example below.</td></tr>
<tr><td class="paramname">out_of_range.403</td><td>if the JSON pointer describes a key of an object which cannot be found. See example below.</td></tr>
<tr><td class="paramname">out_of_range.404</td><td>if the JSON pointer <em>ptr</em> can not be resolved. See example below.</td></tr>
</table>
</dd>
</dl>
<p>@exceptionsafety Strong guarantee: if an exception is thrown, there are no changes in the JSON value.</p>
<p>@complexity Constant.</p>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0</dd></dl>
<p>@liveexample{The behavior is shown in the example.,at_json_pointer_const} </p>
</div>
</div>
<a id="ae91348b027208339c94dbbc6fd769929"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae91348b027208339c94dbbc6fd769929">&#9670;&nbsp;</a></span>flatten()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::flatten </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>return flattened JSON value </p>
<p>The function creates a JSON object whose keys are JSON pointers (see <a href="https://tools.ietf.org/html/rfc6901">RFC 6901</a>) and whose values are all primitive. The original JSON value can be restored using the <a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten()</a> function.</p>
<dl class="section return"><dt>Returns</dt><dd>an object that maps JSON pointers to primitive values</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Empty objects and arrays are flattened to <code>null</code> and will not be reconstructed correctly by the <a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten()</a> function.</dd></dl>
<p>@complexity Linear in the size the JSON value.</p>
<p>@liveexample{The following code shows how a JSON object is flattened to an object whose keys consist of JSON pointers.,flatten}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8">unflatten()</a> for the reverse function</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ac63d16a141ee5c2046410d2d0ba4cec8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac63d16a141ee5c2046410d2d0ba4cec8">&#9670;&nbsp;</a></span>unflatten()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::unflatten </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>unflatten a previously flattened JSON value </p>
<p>The function restores the arbitrary nesting of a JSON value that has been flattened before using the <a class="el" href="classnlohmann_1_1basic__json.html#ae91348b027208339c94dbbc6fd769929">flatten()</a> function. The JSON value must meet certain constraints:</p><ol type="1">
<li>The value must be an object.</li>
<li>The keys must be JSON pointers (see <a href="https://tools.ietf.org/html/rfc6901">RFC 6901</a>)</li>
<li>The mapped values must be primitive JSON types.</li>
</ol>
<dl class="section return"><dt>Returns</dt><dd>the original JSON from a flattened version</dd></dl>
<dl class="section note"><dt>Note</dt><dd>Empty objects and arrays are flattened by <a class="el" href="classnlohmann_1_1basic__json.html#ae91348b027208339c94dbbc6fd769929">flatten()</a> to <code>null</code> values and can not unflattened to their original type. Apart from this example, for a JSON value <code>j</code>, the following is always true: <code>j == j.flatten().<a class="el" href="classnlohmann_1_1basic__json.html#ac63d16a141ee5c2046410d2d0ba4cec8" title="unflatten a previously flattened JSON value">unflatten()</a></code>.</dd></dl>
<p>@complexity Linear in the size the JSON value.</p>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.314</td><td>if value is not an object </td></tr>
<tr><td class="paramname">type_error.315</td><td>if object values are not primitive</td></tr>
</table>
</dd>
</dl>
<p>@liveexample{The following code shows how a flattened JSON object is unflattened into the original nested JSON object.,unflatten}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ae91348b027208339c94dbbc6fd769929">flatten()</a> for the reverse function</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="a71a1bdafcb0f849479622e9acc8f825b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71a1bdafcb0f849479622e9acc8f825b">&#9670;&nbsp;</a></span>patch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::patch </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>json_patch</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>applies a JSON patch </p>
<p><a href="http://jsonpatch.com">JSON Patch</a> defines a JSON document structure for expressing a sequence of operations to apply to a JSON) document. With this function, a JSON Patch is applied to the current JSON value by executing all operations from the patch.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">json_patch</td><td>JSON patch document </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>patched document</dd></dl>
<dl class="section note"><dt>Note</dt><dd>The application of a patch is atomic: Either all operations succeed and the patched document is returned or an exception is thrown. In any case, the original value is not changed: the patch is applied to a copy of the value.</dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.104</td><td>if the JSON patch does not consist of an array of objects</td></tr>
<tr><td class="paramname">parse_error.105</td><td>if the JSON patch is malformed (e.g., mandatory attributes are missing); example: <code>"operation add must have member path"</code></td></tr>
<tr><td class="paramname">out_of_range.401</td><td>if an array index is out of range.</td></tr>
<tr><td class="paramname">out_of_range.403</td><td>if a JSON pointer inside the patch could not be resolved successfully in the current JSON value; example: <code>"key baz not
found"</code></td></tr>
<tr><td class="paramname">out_of_range.405</td><td>if JSON pointer has no parent ("add", "remove", "move")</td></tr>
<tr><td class="paramname">other_error.501</td><td>if "test" operation was unsuccessful</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the size of the JSON value and the length of the JSON patch. As usually only a fraction of the JSON value is affected by the patch, the complexity can usually be neglected.</p>
<p>@liveexample{The following code shows how a JSON patch is applied to a value.,patch}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#ac8305b8912441b11af77564542e6d93e">diff</a> &ndash; <a class="el" href="classnlohmann_1_1basic__json.html#ae1303d46f7c21d1b6197db5f3f263ea1" title="helper for exception-safe object creation">create</a> a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b" title="applies a JSON patch">patch</a> by comparing two JSON values</dd>
<dd>
<a href="https://tools.ietf.org/html/rfc6902">RFC 6902 (JSON Patch)</a> </dd>
<dd>
<a href="https://tools.ietf.org/html/rfc6901">RFC 6901 (JSON Pointer)</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ac8305b8912441b11af77564542e6d93e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac8305b8912441b11af77564542e6d93e">&#9670;&nbsp;</a></span>diff()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static JSON_HEDLEY_WARN_UNUSED_RESULT <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> nlohmann::basic_json::diff </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>source</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>target</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string &amp;&#160;</td>
<td class="paramname"><em>path</em> = <code>&quot;&quot;</code>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>creates a diff as a JSON patch </p>
<p>Creates a <a href="http://jsonpatch.com">JSON Patch</a> so that value <em>source</em> can be changed into the value <em>target</em> by calling <a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b">patch</a> function.</p>
<dl class="section invariant"><dt>Invariant</dt><dd>For two JSON values <em>source</em> and <em>target</em>, the following code yields always <code>true</code>: <div class="fragment"><div class="line">source.patch(<a class="code" href="classnlohmann_1_1basic__json.html#ac8305b8912441b11af77564542e6d93e">diff</a>(source, target)) == target;</div>
</div><!-- fragment --></dd></dl>
<dl class="section note"><dt>Note</dt><dd>Currently, only <code>remove</code>, <code>add</code>, and <code>replace</code> operations are generated.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">source</td><td>JSON value to compare from </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">target</td><td>JSON value to compare against </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">path</td><td>helper value to create JSON pointers</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a JSON patch to convert the <em>source</em> to <em>target</em> </dd></dl>
<p>@complexity Linear in the lengths of <em>source</em> and <em>target</em>.</p>
<p>@liveexample{The following code shows how a JSON patch is created as a diff for two JSON values.,diff}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b">patch</a> &ndash; apply a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b" title="applies a JSON patch">patch</a> </dd>
<dd>
<a class="el" href="classnlohmann_1_1basic__json.html#ab68414151f2f3347a71c7a9984f1d72d">merge_patch</a> &ndash; apply a JSON Merge Patch</dd>
<dd>
<a href="https://tools.ietf.org/html/rfc6902">RFC 6902 (JSON Patch)</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 2.0.0 </dd></dl>
</div>
</div>
<a id="ab68414151f2f3347a71c7a9984f1d72d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab68414151f2f3347a71c7a9984f1d72d">&#9670;&nbsp;</a></span>merge_patch()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void nlohmann::basic_json::merge_patch </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>apply_patch</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>applies a JSON Merge Patch </p>
<p>The merge patch format is primarily intended for use with the HTTP PATCH method as a means of describing a set of modifications to a target resource's content. This function applies a merge patch to the current JSON value.</p>
<p>The function implements the following algorithm from Section 2 of <a href="https://tools.ietf.org/html/rfc7396">RFC 7396 (JSON Merge Patch)</a>:</p>
<div class="fragment"><div class="line">define MergePatch(Target, Patch):</div>
<div class="line"> if Patch is an Object:</div>
<div class="line"> if Target is not an Object:</div>
<div class="line"> Target = {} <span class="comment">// Ignore the contents and set it to an empty Object</span></div>
<div class="line"> <span class="keywordflow">for each</span> Name/Value pair in Patch:</div>
<div class="line"> <span class="keywordflow">if</span> Value is <span class="keyword">null</span>:</div>
<div class="line"> <span class="keywordflow">if</span> Name exists in Target:</div>
<div class="line"> remove the Name/Value pair from Target</div>
<div class="line"> <span class="keywordflow">else</span>:</div>
<div class="line"> Target[Name] = MergePatch(Target[Name], Value)</div>
<div class="line"> <span class="keywordflow">return</span> Target</div>
<div class="line"> <span class="keywordflow">else</span>:</div>
<div class="line"> <span class="keywordflow">return</span> Patch</div>
</div><!-- fragment --><p>Thereby, <code>Target</code> is the current object; that is, the patch is applied to the current value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">apply_patch</td><td>the patch to apply</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the lengths of <em>patch</em>.</p>
<p>@liveexample{The following code shows how a JSON Merge Patch is applied to a JSON document.,merge_patch}</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b">patch</a> &ndash; apply a JSON <a class="el" href="classnlohmann_1_1basic__json.html#a71a1bdafcb0f849479622e9acc8f825b" title="applies a JSON patch">patch</a> </dd>
<dd>
<a href="https://tools.ietf.org/html/rfc7396">RFC 7396 (JSON Merge Patch)</a></dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 3.0.0 </dd></dl>
</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="aee0ae36cbfb0336832ebc0374c3c7679"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee0ae36cbfb0336832ebc0374c3c7679">&#9670;&nbsp;</a></span>swap</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td>
<td class="paramname"><em>left</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#af11372ea846fedea8b2098dba7323831">reference</a>&#160;</td>
<td class="paramname"><em>right</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>exchanges the values </p>
<p>Exchanges the contents of the JSON value from <em>left</em> with those of <em>right</em>. Does not invoke any move, copy, or swap operations on individual elements. All iterators and references remain valid. The past-the-end iterator is invalidated. implemented as a friend function callable via ADL.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">left</td><td>JSON value to exchange the contents with </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">right</td><td>JSON value to exchange the contents with</td></tr>
</table>
</dd>
</dl>
<p>@complexity Constant.</p>
<p>@liveexample{The example below shows how JSON values can be swapped with <code><a class="el" href="classnlohmann_1_1basic__json.html#ade6945272c7b703520f435ad580d3c7f" title="exchanges the values">swap()</a></code>.,swap__reference}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a122640e7e2db1814fc7bbb3c122ec76e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a122640e7e2db1814fc7bbb3c122ec76e">&#9670;&nbsp;</a></span>operator== <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator== </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: equal </p>
<p>Compares two JSON values for equality according to the following rules:</p><ul>
<li>Two JSON values are equal if (1) they are from the same type and (2) their stored values are the same according to their respective <code>operator==</code>.</li>
<li>Integer and floating-point numbers are automatically converted before comparison. Note that two NaN values are always treated as unequal.</li>
<li>Two JSON null values are equal.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Floating-point inside JSON values numbers are compared with <code>json::number_float_t::operator==</code> which is <code>double::operator==</code> by default. To compare floating-point while respecting an epsilon, an alternative <a href="https://github.com/mariokonrad/marnav/blob/master/include/marnav/math/floatingpoint.hpp#L34-#L39">comparison function</a> could be used, for instance <div class="fragment"><div class="line">template&lt;typename T, typename = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, T&gt;<a class="code" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">::type</a>&gt;</div>
<div class="line"><span class="keyword">inline</span> <span class="keywordtype">bool</span> is_same(T a, T b, T epsilon = std::numeric_limits&lt;T&gt;::epsilon()) noexcept</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(a - b) &lt;= epsilon;</div>
<div class="line">}</div>
</div><!-- fragment --> Or you can self-defined operator equal function like this: <div class="fragment"><div class="line"><span class="keywordtype">bool</span> my_equal(<a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) {</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> lhs_type lhs.type();</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> rhs_type rhs.type();</div>
<div class="line"><span class="keywordflow">if</span> (lhs_type == rhs_type) {</div>
<div class="line"> <span class="keywordflow">switch</span>(lhs_type)</div>
<div class="line"> <span class="comment">// self_defined case</span></div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef">value_t::number_float</a>:</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(lhs - rhs) &lt;= std::numeric_limits&lt;float&gt;::epsilon();</div>
<div class="line"> <span class="comment">// other cases remain the same with the original</span></div>
<div class="line"> ...</div>
<div class="line">}</div>
<div class="line">...</div>
<div class="line">}</div>
</div><!-- fragment --></dd>
<dd>
NaN values never compare equal to themselves or to other NaN values.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are equal</dd></dl>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@complexity Linear.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__equal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aba21440ea1aff44f718285ed7d6d20d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba21440ea1aff44f718285ed7d6d20d9">&#9670;&nbsp;</a></span>operator== <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator== </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: equal </p>
<p>comparison: equal Compares two JSON values for equality according to the following rules:</p><ul>
<li>Two JSON values are equal if (1) they are from the same type and (2) their stored values are the same according to their respective <code>operator==</code>.</li>
<li>Integer and floating-point numbers are automatically converted before comparison. Note that two NaN values are always treated as unequal.</li>
<li>Two JSON null values are equal.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Floating-point inside JSON values numbers are compared with <code>json::number_float_t::operator==</code> which is <code>double::operator==</code> by default. To compare floating-point while respecting an epsilon, an alternative <a href="https://github.com/mariokonrad/marnav/blob/master/include/marnav/math/floatingpoint.hpp#L34-#L39">comparison function</a> could be used, for instance <div class="fragment"><div class="line">template&lt;typename T, typename = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, T&gt;<a class="code" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">::type</a>&gt;</div>
<div class="line"><span class="keyword">inline</span> <span class="keywordtype">bool</span> is_same(T a, T b, T epsilon = std::numeric_limits&lt;T&gt;::epsilon()) noexcept</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(a - b) &lt;= epsilon;</div>
<div class="line">}</div>
</div><!-- fragment --> Or you can self-defined operator equal function like this: <div class="fragment"><div class="line"><span class="keywordtype">bool</span> my_equal(<a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) {</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> lhs_type lhs.type();</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> rhs_type rhs.type();</div>
<div class="line"><span class="keywordflow">if</span> (lhs_type == rhs_type) {</div>
<div class="line"> <span class="keywordflow">switch</span>(lhs_type)</div>
<div class="line"> <span class="comment">// self_defined case</span></div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef">value_t::number_float</a>:</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(lhs - rhs) &lt;= std::numeric_limits&lt;float&gt;::epsilon();</div>
<div class="line"> <span class="comment">// other cases remain the same with the original</span></div>
<div class="line"> ...</div>
<div class="line">}</div>
<div class="line">...</div>
<div class="line">}</div>
</div><!-- fragment --></dd>
<dd>
NaN values never compare equal to themselves or to other NaN values.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are equal</dd></dl>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@complexity Linear.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__equal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aef302e3ae215e46e5035d0e4fdf47235"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aef302e3ae215e46e5035d0e4fdf47235">&#9670;&nbsp;</a></span>operator== <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator== </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: equal </p>
<p>comparison: equal Compares two JSON values for equality according to the following rules:</p><ul>
<li>Two JSON values are equal if (1) they are from the same type and (2) their stored values are the same according to their respective <code>operator==</code>.</li>
<li>Integer and floating-point numbers are automatically converted before comparison. Note that two NaN values are always treated as unequal.</li>
<li>Two JSON null values are equal.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd>Floating-point inside JSON values numbers are compared with <code>json::number_float_t::operator==</code> which is <code>double::operator==</code> by default. To compare floating-point while respecting an epsilon, an alternative <a href="https://github.com/mariokonrad/marnav/blob/master/include/marnav/math/floatingpoint.hpp#L34-#L39">comparison function</a> could be used, for instance <div class="fragment"><div class="line">template&lt;typename T, typename = typename std::enable_if&lt;std::is_floating_point&lt;T&gt;::value, T&gt;<a class="code" href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">::type</a>&gt;</div>
<div class="line"><span class="keyword">inline</span> <span class="keywordtype">bool</span> is_same(T a, T b, T epsilon = std::numeric_limits&lt;T&gt;::epsilon()) noexcept</div>
<div class="line">{</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(a - b) &lt;= epsilon;</div>
<div class="line">}</div>
</div><!-- fragment --> Or you can self-defined operator equal function like this: <div class="fragment"><div class="line"><span class="keywordtype">bool</span> my_equal(<a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> lhs, <a class="code" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a> rhs) {</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> lhs_type lhs.type();</div>
<div class="line"><span class="keyword">const</span> <span class="keyword">auto</span> rhs_type rhs.type();</div>
<div class="line"><span class="keywordflow">if</span> (lhs_type == rhs_type) {</div>
<div class="line"> <span class="keywordflow">switch</span>(lhs_type)</div>
<div class="line"> <span class="comment">// self_defined case</span></div>
<div class="line"> <span class="keywordflow">case</span> <a class="code" href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef">value_t::number_float</a>:</div>
<div class="line"> <span class="keywordflow">return</span> std::abs(lhs - rhs) &lt;= std::numeric_limits&lt;float&gt;::epsilon();</div>
<div class="line"> <span class="comment">// other cases remain the same with the original</span></div>
<div class="line"> ...</div>
<div class="line">}</div>
<div class="line">...</div>
<div class="line">}</div>
</div><!-- fragment --></dd>
<dd>
NaN values never compare equal to themselves or to other NaN values.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are equal</dd></dl>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@complexity Linear.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__equal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a6e2e21da48f5d9471716cd868a068327"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6e2e21da48f5d9471716cd868a068327">&#9670;&nbsp;</a></span>operator!= <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator!= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: not equal </p>
<p>Compares two JSON values for inequality by calculating <code>not (lhs == rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are not equal</dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__notequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="afefc38fc08bdb7a9a7474b5ab4a1140f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afefc38fc08bdb7a9a7474b5ab4a1140f">&#9670;&nbsp;</a></span>operator!= <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator!= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: not equal </p>
<p>comparison: not equal Compares two JSON values for inequality by calculating <code>not (lhs == rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are not equal</dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__notequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ab0e886db6e9fa91ff9fd853333fed05b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0e886db6e9fa91ff9fd853333fed05b">&#9670;&nbsp;</a></span>operator!= <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator!= </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: not equal </p>
<p>comparison: not equal Compares two JSON values for inequality by calculating <code>not (lhs == rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the values <em>lhs</em> and <em>rhs</em> are not equal</dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__notequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="aacd442b66140c764c594ac8ad7dfd5b3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aacd442b66140c764c594ac8ad7dfd5b3">&#9670;&nbsp;</a></span>operator&lt; <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt; </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than </p>
<p>Compares whether one JSON value <em>lhs</em> is less than another JSON value <em>rhs</em> according to the following rules:</p><ul>
<li>If <em>lhs</em> and <em>rhs</em> have the same type, the values are compared using the default <code>&lt;</code> operator.</li>
<li>Integer and floating-point numbers are automatically converted before comparison</li>
<li>In case <em>lhs</em> and <em>rhs</em> have different types, the values are ignored and the order of the types is considered, see operator&lt;(const value_t, const value_t).</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__less}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a7999ee3a69a4979d92e98ab1e88c8759"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7999ee3a69a4979d92e98ab1e88c8759">&#9670;&nbsp;</a></span>operator&lt; <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt; </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than </p>
<p>comparison: less than Compares whether one JSON value <em>lhs</em> is less than another JSON value <em>rhs</em> according to the following rules:</p><ul>
<li>If <em>lhs</em> and <em>rhs</em> have the same type, the values are compared using the default <code>&lt;</code> operator.</li>
<li>Integer and floating-point numbers are automatically converted before comparison</li>
<li>In case <em>lhs</em> and <em>rhs</em> have different types, the values are ignored and the order of the types is considered, see operator&lt;(const value_t, const value_t).</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__less}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="abed3e9b4ab75f5bcbd3cd20f5af5cdab"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abed3e9b4ab75f5bcbd3cd20f5af5cdab">&#9670;&nbsp;</a></span>operator&lt; <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt; </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than </p>
<p>comparison: less than Compares whether one JSON value <em>lhs</em> is less than another JSON value <em>rhs</em> according to the following rules:</p><ul>
<li>If <em>lhs</em> and <em>rhs</em> have the same type, the values are compared using the default <code>&lt;</code> operator.</li>
<li>Integer and floating-point numbers are automatically converted before comparison</li>
<li>In case <em>lhs</em> and <em>rhs</em> have different types, the values are ignored and the order of the types is considered, see operator&lt;(const value_t, const value_t).</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__less}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a5c8bb5200f5eac10d31e26be46e5b1ac"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c8bb5200f5eac10d31e26be46e5b1ac">&#9670;&nbsp;</a></span>operator&lt;= <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt;= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than or equal </p>
<p>Compares whether one JSON value <em>lhs</em> is less than or equal to another JSON value by calculating <code>not (rhs &lt; lhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greater}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a7e368211047f725f333696aefdf39ffd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7e368211047f725f333696aefdf39ffd">&#9670;&nbsp;</a></span>operator&lt;= <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt;= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than or equal </p>
<p>comparison: less than or equal Compares whether one JSON value <em>lhs</em> is less than or equal to another JSON value by calculating <code>not (rhs &lt; lhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greater}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="ad73f88f70fe5acfa521750a8cd710026"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad73f88f70fe5acfa521750a8cd710026">&#9670;&nbsp;</a></span>operator&lt;= <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&lt;= </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: less than or equal </p>
<p>comparison: less than or equal Compares whether one JSON value <em>lhs</em> is less than or equal to another JSON value by calculating <code>not (rhs &lt; lhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is less than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greater}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a87db51b6b936fb2ea293cdbc8702dcb8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a87db51b6b936fb2ea293cdbc8702dcb8">&#9670;&nbsp;</a></span>operator&gt; <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt; </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than </p>
<p>Compares whether one JSON value <em>lhs</em> is greater than another JSON value by calculating <code>not (lhs &lt;= rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__lessequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a412895af9a582869a4d369a64fb1b6d6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a412895af9a582869a4d369a64fb1b6d6">&#9670;&nbsp;</a></span>operator&gt; <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt; </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than </p>
<p>comparison: greater than Compares whether one JSON value <em>lhs</em> is greater than another JSON value by calculating <code>not (lhs &lt;= rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__lessequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a124c319566198d9f092c5bebea46ce77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a124c319566198d9f092c5bebea46ce77">&#9670;&nbsp;</a></span>operator&gt; <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt; </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than </p>
<p>comparison: greater than Compares whether one JSON value <em>lhs</em> is greater than another JSON value by calculating <code>not (lhs &lt;= rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__lessequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a74a943800c7f103d0990d7eef82c6453"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a74a943800c7f103d0990d7eef82c6453">&#9670;&nbsp;</a></span>operator&gt;= <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt;= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than or equal </p>
<p>Compares whether one JSON value <em>lhs</em> is greater than or equal to another JSON value by calculating <code>not (lhs &lt; rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greaterequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a68e3a92b3d9be1faa05c92d096299189"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a68e3a92b3d9be1faa05c92d096299189">&#9670;&nbsp;</a></span>operator&gt;= <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt;= </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than or equal </p>
<p>comparison: greater than or equal Compares whether one JSON value <em>lhs</em> is greater than or equal to another JSON value by calculating <code>not (lhs &lt; rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greaterequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a5ee0e3e8afc7cbd932d6ed66418fa80a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ee0e3e8afc7cbd932d6ed66418fa80a">&#9670;&nbsp;</a></span>operator&gt;= <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ScalarType , typename std::enable_if&lt; std::is_scalar&lt; ScalarType &gt;::value, int &gt;::type = 0&gt; </div>
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">bool operator&gt;= </td>
<td>(</td>
<td class="paramtype">const ScalarType&#160;</td>
<td class="paramname"><em>lhs</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">const_reference</a>&#160;</td>
<td class="paramname"><em>rhs</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>comparison: greater than or equal </p>
<p>comparison: greater than or equal Compares whether one JSON value <em>lhs</em> is greater than or equal to another JSON value by calculating <code>not (lhs &lt; rhs)</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">lhs</td><td>first JSON value to consider </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">rhs</td><td>second JSON value to consider </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether <em>lhs</em> is greater than or equal to <em>rhs</em> </dd></dl>
<p>@complexity Linear.</p>
<p>@exceptionsafety No-throw guarantee: this function never throws exceptions.</p>
<p>@liveexample{The example demonstrates comparing several JSON types.,operator__greaterequal}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
<a id="a5e34c5435e557d0bf666bd7311211405"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e34c5435e557d0bf666bd7311211405">&#9670;&nbsp;</a></span>operator&lt;&lt; <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::ostream&amp; operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype">std::ostream &amp;&#160;</td>
<td class="paramname"><em>o</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>serialize to stream </p>
<p>Serialize the given JSON value <em>j</em> to the output stream <em>o</em>. The JSON value will be serialized using the <a class="el" href="classnlohmann_1_1basic__json.html#acfc564f36da667b7d9109879d34dc36c">dump</a> member function.</p>
<ul>
<li>The indentation of the output can be controlled with the member variable <code>width</code> of the output stream <em>o</em>. For instance, using the manipulator <code>std::setw(4)</code> on <em>o</em> sets the indentation level to <code>4</code> and the serialization result is the same as calling <code>dump(4)</code>.</li>
<li>The indentation character can be controlled with the member variable <code>fill</code> of the output stream <em>o</em>. For instance, the manipulator &lsquo;std::setfill(&rsquo;\t')` sets indentation to use a tab character rather than the default space character.</li>
</ul>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">o</td><td>stream to serialize to </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">j</td><td>JSON value to serialize</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>the stream <em>o</em> </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">type_error.316</td><td>if a string stored inside the JSON value is not UTF-8 encoded</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear.</p>
<p>@liveexample{The example below shows the serialization with different parameters to <code>width</code> to adjust the indentation level.,operator_serialize}</p>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0; indentation character added in version 3.0.0 </dd></dl>
</div>
</div>
<a id="a34d6a60dd99e9f33b8273a1c8db5669b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a34d6a60dd99e9f33b8273a1c8db5669b">&#9670;&nbsp;</a></span>operator&gt;&gt; <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::ostream&amp; operator&gt;&gt; </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::ostream &amp;&#160;</td>
<td class="paramname"><em>o</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>serialize to stream </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>This stream operator is deprecated and will be removed in future 4.0.0 of the library. Please use <a class="el" href="classnlohmann_1_1basic__json.html#a5e34c5435e557d0bf666bd7311211405">operator&lt;&lt;(std::ostream&amp;, const basic_json&amp;)</a> instead; that is, replace calls like <code>j &gt;&gt; o;</code> with <code>o &lt;&lt; j;</code>. </dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0; deprecated since version 3.0.0 </dd></dl>
</div>
</div>
<a id="a60ca396028b8d9714c6e10efbf475af6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a60ca396028b8d9714c6e10efbf475af6">&#9670;&nbsp;</a></span>operator&lt;&lt; <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::istream&amp; operator&lt;&lt; </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::istream &amp;&#160;</td>
<td class="paramname"><em>i</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>deserialize from stream </p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>This stream operator is deprecated and will be removed in version 4.0.0 of the library. Please use <a class="el" href="classnlohmann_1_1basic__json.html#aaf363408931d76472ded14017e59c9e8">operator&gt;&gt;(std::istream&amp;, basic_json&amp;)</a> instead; that is, replace calls like <code>j &lt;&lt; i;</code> with <code>i &gt;&gt; j;</code>. </dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0; deprecated since version 3.0.0 </dd></dl>
</div>
</div>
<a id="aaf363408931d76472ded14017e59c9e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aaf363408931d76472ded14017e59c9e8">&#9670;&nbsp;</a></span>operator&gt;&gt; <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::istream&amp; operator&gt;&gt; </td>
<td>(</td>
<td class="paramtype">std::istream &amp;&#160;</td>
<td class="paramname"><em>i</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a> &amp;&#160;</td>
<td class="paramname"><em>j</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>deserialize from stream </p>
<p>Deserializes an input stream to a JSON value.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">i</td><td>input stream to read a serialized JSON value from </td></tr>
<tr><td class="paramdir">[in,out]</td><td class="paramname">j</td><td>JSON value to write the deserialized input to</td></tr>
</table>
</dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
<table class="exception">
<tr><td class="paramname">parse_error.101</td><td>in case of an unexpected token </td></tr>
<tr><td class="paramname">parse_error.102</td><td>if to_unicode fails or surrogate error </td></tr>
<tr><td class="paramname">parse_error.103</td><td>if to_unicode fails</td></tr>
</table>
</dd>
</dl>
<p>@complexity Linear in the length of the input. The parser is a predictive LL(1) parser.</p>
<dl class="section note"><dt>Note</dt><dd>A UTF-8 byte order mark is silently ignored.</dd></dl>
<p>@liveexample{The example below shows how a JSON value is constructed by reading a serialization from a stream.,operator_deserialize}</p>
<dl class="section see"><dt>See also</dt><dd>parse(std::istream&amp;, const parser_callback_t) for a variant with a parser callback function to filter values while parsing</dd></dl>
<dl class="section since"><dt>Since</dt><dd>version 1.0.0 </dd></dl>
</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_ad886f4baa2efb7ac6b0ca70dc72f3d18"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#ad886f4baa2efb7ac6b0ca70dc72f3d18">nlohmann::basic_json::basic_json</a></div><div class="ttdeci">basic_json(const value_t v)</div><div class="ttdoc">create an empty value with a given type</div><div class="ttdef"><b>Definition:</b> json.hpp:17830</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_a530ad60b7fb590e0ee45b6803144cc00"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#a530ad60b7fb590e0ee45b6803144cc00">nlohmann::basic_json::type</a></div><div class="ttdeci">constexpr value_t type() const noexcept</div><div class="ttdoc">return the type of the JSON value (explicit)</div><div class="ttdef"><b>Definition:</b> json.hpp:18812</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_ac8305b8912441b11af77564542e6d93e"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#ac8305b8912441b11af77564542e6d93e">nlohmann::basic_json::diff</a></div><div class="ttdeci">static JSON_HEDLEY_WARN_UNUSED_RESULT basic_json diff(const basic_json &amp;source, const basic_json &amp;target, const std::string &amp;path=&quot;&quot;)</div><div class="ttdoc">creates a diff as a JSON patch</div><div class="ttdef"><b>Definition:</b> json.hpp:24958</div></div>
<div class="ttc" id="anamespacenlohmann_1_1detail_html_a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef"><div class="ttname"><a href="namespacenlohmann_1_1detail.html#a1ed8fc6239da25abcaf681d30ace4985ad9966ecb59667235a57b4b999a649eef">nlohmann::detail::value_t::number_float</a></div><div class="ttdeci">@ number_float</div><div class="ttdoc">number value (floating-point)</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_a2e8fc803a09152f3174470ea2375b383"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#a2e8fc803a09152f3174470ea2375b383">nlohmann::basic_json::out_of_range</a></div><div class="ttdeci">detail::out_of_range out_of_range</div><div class="ttdoc">exception indicating access out of the defined range</div><div class="ttdef"><b>Definition:</b> json.hpp:16747</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_a5805a2f5a4f94bdff25423e7ba833ad2"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#a5805a2f5a4f94bdff25423e7ba833ad2">nlohmann::basic_json::at</a></div><div class="ttdeci">reference at(size_type idx)</div><div class="ttdoc">access specified array element with bounds checking</div><div class="ttdef"><b>Definition:</b> json.hpp:19793</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_a0a8051760196ac813fd5eb3c8d5a2976"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#a0a8051760196ac813fd5eb3c8d5a2976">nlohmann::basic_json::iterator_wrapper</a></div><div class="ttdeci">static iteration_proxy&lt; iterator &gt; iterator_wrapper(reference ref) noexcept</div><div class="ttdoc">wrapper to access iterator member functions in range-based for</div><div class="ttdef"><b>Definition:</b> json.hpp:21274</div></div>
<div class="ttc" id="aclassnlohmann_1_1basic__json_html_ae83ab5539e404c901ab216aafc9dc6d9"><div class="ttname"><a href="classnlohmann_1_1basic__json.html#ae83ab5539e404c901ab216aafc9dc6d9">nlohmann::basic_json::const_reference</a></div><div class="ttdeci">const value_type &amp; const_reference</div><div class="ttdoc">the type of an element const reference</div><div class="ttdef"><b>Definition:</b> json.hpp:16769</div></div>
<div class="ttc" id="anamespacenlohmann_1_1detail_html_a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d"><div class="ttname"><a href="namespacenlohmann_1_1detail.html#a2fb6dae6578e06ae73ca0d7cc8512b1aa3c6e0b8a9c15224a8228b9a98ca1531d">nlohmann::detail::parse_event_t::key</a></div><div class="ttdeci">@ key</div><div class="ttdoc">the parser read a key of a value in an object</div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacenlohmann.html">nlohmann</a></li><li class="navelem"><a class="el" href="classnlohmann_1_1basic__json.html">basic_json</a></li>
<li class="footer">Generated by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
</ul>
</div>
</body>
</html>