mirror of
https://github.com/nlohmann/json.git
synced 2026-10-16 11:17:13 +00:00
deploy: 4e294f4b18
This commit is contained in:
1 parent
dcc7a74a18
commit
98c9bea1d1
105 files changed
+537
-508
No files matched your search
@@ -250,10 +250,11 @@ exception id: 401
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range402>json.exception.out_of_range.402<a class=headerlink href=#jsonexceptionout_of_range402 title="Permanent link">¶</a></h3> <p>The special array index <code>-</code> in a <abbr title="JavaScript Object Notation">JSON</abbr> 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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>array index '-' (3) is out of range
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range403>json.exception.out_of_range.403<a class=headerlink href=#jsonexceptionout_of_range403 title="Permanent link">¶</a></h3> <p>The provided key was not found in the <abbr title="JavaScript Object Notation">JSON</abbr> object.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>key 'foo' not found
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range404>json.exception.out_of_range.404<a class=headerlink href=#jsonexceptionout_of_range404 title="Permanent link">¶</a></h3> <p>A reference token in a <abbr title="JavaScript Object Notation">JSON</abbr> Pointer could not be resolved, for instance an array index that begins with a digit but contains other characters (e.g., <code>1a</code>), or <code>-</code> where it cannot be used.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>unresolved reference token 'foo'
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range405>json.exception.out_of_range.405<a class=headerlink href=#jsonexceptionout_of_range405 title="Permanent link">¶</a></h3> <p>The <abbr title="JavaScript Object Notation">JSON</abbr> Patch operations 'remove' and 'add' cannot be applied to the root element of the <abbr title="JavaScript Object Notation">JSON</abbr> value.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>JSON pointer has no parent
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range405>json.exception.out_of_range.405<a class=headerlink href=#jsonexceptionout_of_range405 title="Permanent link">¶</a></h3> <p>The <abbr title="JavaScript Object Notation">JSON</abbr> Patch operations 'remove' and 'move' cannot be applied to the root element of the <abbr title="JavaScript Object Notation">JSON</abbr> value. The exception is also thrown when the parent or a reference token of an empty <abbr title="JavaScript Object Notation">JSON</abbr> Pointer is requested, for instance by <a href=../../api/json_pointer/back/ ><code>back</code></a> or <a href=../../api/json_pointer/pop_back/ ><code>pop_back</code></a>.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>JSON pointer has no parent
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range406>json.exception.out_of_range.406<a class=headerlink href=#jsonexceptionout_of_range406 title="Permanent link">¶</a></h3> <p>A parsed number could not be stored without changing it to <abbr title="Not a Number">NaN</abbr> or INF. For the binary formats, this happens when a finite floating-point number does not fit into <a href=../../api/basic_json/number_float_t/ ><code>number_float_t</code></a>, for example a double-precision number when <code>number_float_t</code> is <code class=highlight><span class=kt>float</span></code>.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>number overflow parsing '10E1000'
|
||||
</code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.out_of_range.406] syntax error while parsing CBOR value: number overflow
|
||||
</code></pre></div></p> </div> <h3 id=jsonexceptionout_of_range407>json.exception.out_of_range.407<a class=headerlink href=#jsonexceptionout_of_range407 title="Permanent link">¶</a></h3> <p>This exception previously indicated that the <abbr title="Universal Binary JSON">UBJSON</abbr> and <abbr title="Binary JSON">BSON</abbr> binary formats did not support integer numbers greater than 9223372036854775807 due to limitations in the implemented mapping. However, these limitations have since been resolved, and this exception no longer occurs.</p> <div class="admonition success"> <p class=admonition-title>Exception cannot occur any more</p> <ul> <li>Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision <abbr title="Universal Binary JSON">UBJSON</abbr> numbers.</li> <li>Since version 3.12.0, integer numbers beyond int64 are serialized as uint64 <abbr title="Binary JSON">BSON</abbr> numbers.</li> </ul> </div> <h3 id=jsonexceptionout_of_range408>json.exception.out_of_range.408<a class=headerlink href=#jsonexceptionout_of_range408 title="Permanent link">¶</a></h3> <p>The size of an array or object in a <a href=../../features/binary_formats/ >binary format</a> exceeds the maximal capacity: the size following <code>#</code> for <a href=../../features/binary_formats/ubjson/ ><abbr title="Universal Binary JSON">UBJSON</abbr></a>/<a href=../../features/binary_formats/bjdata/ ><abbr title="Binary JData">BJData</abbr></a>, or the encoded length for <a href=../../features/binary_formats/cbor/ ><abbr title="Concise Binary Object Representation">CBOR</abbr></a>.</p> <p>The exception is also thrown for a <a href=../../features/binary_formats/ubjson/ ><abbr title="Universal Binary JSON">UBJSON</abbr></a> array of a type that is encoded by its marker alone (<code>Z</code>, <code>T</code> or <code>F</code>) whose declared count exceeds 1,048,576 (<code>1 << 20</code>). Such an array has no payload, so its count alone decides how much memory is allocated, and a handful of bytes would otherwise describe billions of values. <a href=../../api/basic_json/to_ubjson/ ><code>to_ubjson</code></a> writes longer arrays of these types without the size and type annotation, so any value it produces can still be read back.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>excessive array size: 8658170730974374167
|
||||
</code></pre></div></p> </div> <h3 id=jsonexceptionout_of_range407>json.exception.out_of_range.407<a class=headerlink href=#jsonexceptionout_of_range407 title="Permanent link">¶</a></h3> <p>An unsigned integer number greater than 9223372036854775807 cannot be represented in the binary format. This exception is only thrown by <a href=../../api/basic_json/to_bon8/ ><code>to_bon8</code></a>, as <a href=../../features/binary_formats/bon8/ ><abbr title="Binary Object Notation 8">BON8</abbr></a> has no unsigned 64-bit integer type.</p> <div class="admonition note"> <p class=admonition-title>Former occurrences</p> <p>The <abbr title="Universal Binary JSON">UBJSON</abbr> and <abbr title="Binary JSON">BSON</abbr> writers used to throw this exception as well:</p> <ul> <li>Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision <abbr title="Universal Binary JSON">UBJSON</abbr> numbers.</li> <li>Since version 3.12.0, integer numbers beyond int64 are serialized as uint64 <abbr title="Binary JSON">BSON</abbr> numbers.</li> </ul> </div> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>integer number 18446744073709551615 cannot be represented by BON8 as it does not fit int64
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionout_of_range408>json.exception.out_of_range.408<a class=headerlink href=#jsonexceptionout_of_range408 title="Permanent link">¶</a></h3> <p>The size of an array or object in a <a href=../../features/binary_formats/ >binary format</a> exceeds the maximal capacity: the size following <code>#</code> for <a href=../../features/binary_formats/ubjson/ ><abbr title="Universal Binary JSON">UBJSON</abbr></a>/<a href=../../features/binary_formats/bjdata/ ><abbr title="Binary JData">BJData</abbr></a>, or the encoded length for <a href=../../features/binary_formats/cbor/ ><abbr title="Concise Binary Object Representation">CBOR</abbr></a>.</p> <p>The exception is also thrown for a <a href=../../features/binary_formats/ubjson/ ><abbr title="Universal Binary JSON">UBJSON</abbr></a> array of a type that is encoded by its marker alone (<code>Z</code>, <code>T</code> or <code>F</code>) whose declared count exceeds 1,048,576 (<code>1 << 20</code>). Such an array has no payload, so its count alone decides how much memory is allocated, and a handful of bytes would otherwise describe billions of values. <a href=../../api/basic_json/to_ubjson/ ><code>to_ubjson</code></a> writes longer arrays of these types without the size and type annotation, so any value it produces can still be read back.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>excessive array size: 8658170730974374167
|
||||
</code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.out_of_range.408] syntax error while parsing CBOR size: excessive array size
|
||||
</code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.out_of_range.408] syntax error while parsing CBOR size: excessive map size
|
||||
</code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.out_of_range.408] syntax error while parsing UBJSON size: excessive array size
|
||||
@@ -300,4 +301,4 @@ array index 18446744073709551616 exceeds size_type
|
||||
exception id: 501
|
||||
</code></pre></div> </details> <h3 id=jsonexceptionother_error501>json.exception.other_error.501<a class=headerlink href=#jsonexceptionother_error501 title="Permanent link">¶</a></h3> <p>A <abbr title="JavaScript Object Notation">JSON</abbr> Patch operation 'test' failed. The unsuccessful operation is also printed.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p>Executing <code class=highlight><span class=p>{</span><span class=nt>"op"</span><span class=p>:</span><span class=s2>"test"</span><span class=p>,</span><span class=w> </span><span class=nt>"path"</span><span class=p>:</span><span class=s2>"/baz"</span><span class=p>,</span><span class=w> </span><span class=nt>"value"</span><span class=p>:</span><span class=s2>"bar"</span><span class=p>}</span></code> on <code class=highlight><span class=p>{</span><span class=nt>"baz"</span><span class=p>:</span><span class=w> </span><span class=s2>"qux"</span><span class=p>}</span></code>:</p> <div class=highlight><pre><span></span><code>[json.exception.other_error.501] unsuccessful: {"op":"test","path":"/baz","value":"bar"}
|
||||
</code></pre></div> </div> <h3 id=jsonexceptionother_error502>json.exception.other_error.502<a class=headerlink href=#jsonexceptionother_error502 title="Permanent link">¶</a></h3> <p><a href=../../api/basic_json/to_ubjson/ ><code>to_ubjson</code></a> and <a href=../../api/basic_json/to_bjdata/ ><code>to_bjdata</code></a> were called with <code>use_type = true</code> but <code>use_size = false</code>. <abbr title="Universal Binary JSON">UBJSON</abbr> requires a size marker (<code>#</code>) after a type marker (<code>$</code>).</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.other_error.502] use_type requires use_size = true
|
||||
</code></pre></div> </div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>This exception was added in version 3.13.0 <span class=unreleased-version title="Not part of a release yet; the latest release is 3.12.0.">unreleased</span>. Before that, debug builds aborted on an assertion and release builds wrote a <code>$</code> marker without <code>#</code>, which <a href=../../api/basic_json/from_ubjson/ ><code>from_ubjson</code></a> then rejected.</p> </div> <!-- https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-a-glossary --> <aside class=md-source-file> <span class=md-source-file__fact> <span class=md-icon title="Last update"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="October 11, 2026 06:22:00 UTC">October 11, 2026</span> </span> </aside> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright © 2013-2026 Niels Lohmann </div> </div> <div class=md-social> <a href="https://github.com/nlohmann" target="_blank" rel="noopener" title="github.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 512 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> <a href="https://www.linkedin.com/in/nielslohmann/" target="_blank" rel="noopener" title="www.linkedin.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zM102.2 96a38.5 38.5 0 1 1 0 77 38.5 38.5 0 1 1 0-77m282.1 320h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9z"/></svg> </a> <a href="https://www.xing.com/profile/Niels_Lohmann" target="_blank" rel="noopener" title="www.xing.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 384 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.Line truncated
|
||||
</code></pre></div> </div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>This exception was added in version 3.13.0 <span class=unreleased-version title="Not part of a release yet; the latest release is 3.12.0.">unreleased</span>. Before that, debug builds aborted on an assertion and release builds wrote a <code>$</code> marker without <code>#</code>, which <a href=../../api/basic_json/from_ubjson/ ><code>from_ubjson</code></a> then rejected.</p> </div> <!-- https://squidfunk.github.io/mkdocs-material/reference/tooltips/#adding-a-glossary --> <aside class=md-source-file> <span class=md-source-file__fact> <span class=md-icon title="Last update"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M21 13.1c-.1 0-.3.1-.4.2l-1 1 2.1 2.1 1-1c.2-.2.2-.6 0-.8l-1.3-1.3c-.1-.1-.2-.2-.4-.2m-1.9 1.8-6.1 6V23h2.1l6.1-6.1zM12.5 7v5.2l4 2.4-1 1L11 13V7zM11 21.9c-5.1-.5-9-4.8-9-9.9C2 6.5 6.5 2 12 2c5.3 0 9.6 4.1 10 9.3-.3-.1-.6-.2-1-.2s-.7.1-1 .2C19.6 7.2 16.2 4 12 4c-4.4 0-8 3.6-8 8 0 4.1 3.1 7.5 7.1 7.9l-.1.2z"/></svg> </span> <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date" title="October 14, 2026 15:40:55 UTC">October 14, 2026</span> </span> </aside> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type=button class="md-top md-icon" data-md-component=top hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class=md-footer> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class=md-copyright> <div class=md-copyright__highlight> Copyright © 2013-2026 Niels Lohmann </div> </div> <div class=md-social> <a href="https://github.com/nlohmann" target="_blank" rel="noopener" title="github.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 512 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg> </a> <a href="https://www.linkedin.com/in/nielslohmann/" target="_blank" rel="noopener" title="www.linkedin.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M416 32H31.9C14.3 32 0 46.5 0 64.3v383.4C0 465.5 14.3 480 31.9 480H416c17.6 0 32-14.5 32-32.3V64.3c0-17.8-14.4-32.3-32-32.3M135.4 416H69V202.2h66.5V416zM102.2 96a38.5 38.5 0 1 1 0 77 38.5 38.5 0 1 1 0-77m282.1 320h-66.4V312c0-24.8-.5-56.7-34.5-56.7-34.6 0-39.9 27-39.9 54.9V416h-66.4V202.2h63.7v29.2h.9c8.9-16.8 30.6-34.5 62.9-34.5 67.2 0 79.7 44.3 79.7 101.9z"/></svg> </a> <a href="https://www.xing.com/profile/Niels_Lohmann" target="_blank" rel="noopener" title="www.xing.com" class="md-social__link"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 384 512"><!-- Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.Line truncated
|
||||
@@ -1008,7 +1008,7 @@ unresolved reference token 'foo'
|
||||
|
||||
### json.exception.out_of_range.405
|
||||
|
||||
The JSON Patch operations 'remove' and 'add' cannot be applied to the root element of the JSON value.
|
||||
The JSON Patch operations 'remove' and 'move' cannot be applied to the root element of the JSON value. The exception is also thrown when the parent or a reference token of an empty JSON Pointer is requested, for instance by [`back`](https://json.nlohmann.me/api/json_pointer/back/index.md) or [`pop_back`](https://json.nlohmann.me/api/json_pointer/pop_back/index.md).
|
||||
|
||||
Example message
|
||||
|
||||
@@ -1032,13 +1032,21 @@ number overflow parsing '10E1000'
|
||||
|
||||
### json.exception.out_of_range.407
|
||||
|
||||
This exception previously indicated that the UBJSON and BSON binary formats did not support integer numbers greater than 9223372036854775807 due to limitations in the implemented mapping. However, these limitations have since been resolved, and this exception no longer occurs.
|
||||
An unsigned integer number greater than 9223372036854775807 cannot be represented in the binary format. This exception is only thrown by [`to_bon8`](https://json.nlohmann.me/api/basic_json/to_bon8/index.md), as [BON8](https://json.nlohmann.me/features/binary_formats/bon8/index.md) has no unsigned 64-bit integer type.
|
||||
|
||||
Exception cannot occur any more
|
||||
Former occurrences
|
||||
|
||||
The UBJSON and BSON writers used to throw this exception as well:
|
||||
|
||||
- Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision UBJSON numbers.
|
||||
- Since version 3.12.0, integer numbers beyond int64 are serialized as uint64 BSON numbers.
|
||||
|
||||
Example message
|
||||
|
||||
```
|
||||
integer number 18446744073709551615 cannot be represented by BON8 as it does not fit int64
|
||||
```
|
||||
|
||||
### json.exception.out_of_range.408
|
||||
|
||||
The size of an array or object in a [binary format](https://json.nlohmann.me/features/binary_formats/index.md) exceeds the maximal capacity: the size following `#` for [UBJSON](https://json.nlohmann.me/features/binary_formats/ubjson/index.md)/[BJData](https://json.nlohmann.me/features/binary_formats/bjdata/index.md), or the encoded length for [CBOR](https://json.nlohmann.me/features/binary_formats/cbor/index.md).
|
||||
|
||||
Reference in new issue
Block a user