| <!doctype html><html lang=en class=no-js> <head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=author content="Niels Lohmann"><link href=https://json.nlohmann.me/home/exceptions/ rel=canonical><link href=../faq/ rel=prev><link href=../releases/ rel=next><link rel=icon href=../../assets/images/favicon.png><meta name=generator content="mkdocs-1.5.3, mkdocs-material-9.4.7"><title>Exceptions - JSON for Modern C++</title><link rel=stylesheet href=../../assets/stylesheets/main.4b4a2bd9.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.356b1318.min.css><link rel=preconnect href=https://fonts.gstatic.com crossorigin><link rel=stylesheet href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CJetBrains+Mono:400,400i,700,700i&display=fallback"><style>:root{--md-text-font:"Roboto";--md-code-font:"JetBrains Mono"}</style><link rel=stylesheet href=../../css/custom.css><script>__md_scope=new URL("../..",location),__md_hash=e=>[...e].reduce((e,_)=>(e<<5)-e+_.charCodeAt(0),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script></head> <body dir=ltr data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo> <script>var palette=__md_get("__palette");if(palette&&"object"==typeof palette.color)for(var key of Object.keys(palette.color))document.body.setAttribute("data-md-color-"+key,palette.color[key])</script> <input class=md-toggle data-md-toggle=drawer type=checkbox id=__drawer autocomplete=off> <input class=md-toggle data-md-toggle=search type=checkbox id=__search autocomplete=off> <label class=md-overlay for=__drawer></label> <div data-md-component=skip> <a href=#exceptions class=md-skip> Skip to content </a> </div> <div data-md-component=announce> </div> <header class=md-header data-md-component=header> <nav class="md-header__inner md-grid" aria-label=Header> <a href=../.. title="JSON for Modern C++" class="md-header__button md-logo" aria-label="JSON for Modern C++" data-md-component=logo> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg> </a> <label class="md-header__button md-icon" for=__drawer> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2Z"/></svg> </label> <div class=md-header__title data-md-component=header-title> <div class=md-header__ellipsis> <div class=md-header__topic> <span class=md-ellipsis> JSON for Modern C++ </span> </div> <div class=md-header__topic data-md-component=header-topic> <span class=md-ellipsis> Exceptions </span> </div> </div> </div> <form class=md-header__option data-md-component=palette> <input class=md-option data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme=default data-md-color-primary=indigo data-md-color-accent=indigo aria-label="Switch to dark mode" type=radio name=__palette id=__palette_1> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_2 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> </label> <input class=md-option data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme=slate data-md-color-primary=indigo data-md-color-accent=indigo aria-label="Switch to light mode" type=radio name=__palette id=__palette_2> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_1 hidden> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12c0-2.42-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12 20 8.69Z"/></svg> </label> </form> <label class="md-header__button md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg> </label> <div class=md-search data-md-component=search role=dialog> <label class=md-search__overlay for=__search></label> <div class=md-search__inner role=search> <form class=md-search__form name=search> <input type=text class=md-search__input name=query aria-label=Search placeholder=Search autocapitalize=off autocorrect=off autocomplete=off spellcheck=false data-md-component=search-query required> <label class="md-search__icon md-icon" for=__search> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5Z"/></svg> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12Z"/></svg> </label> <nav class=md-search__options aria-label=Search> <button type=reset class="md-search__icon md-icon" title=Clear aria-label=Clear tabindex=-1> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41Z"/></svg> </button> </nav> </form> <div class=md-search__output> <div class=md-search__scrollwrap data-md-scrollfix> <div class=md-search-result data-md-component=search-result> <div class=md-search-result__meta> Initializing search </div> <ol class=md-search-result__list role=presentation></ol> </div> </div> </div> </div> </div> <div class=md-header__source> <a href=https://github.com/nlohmann/json title="Go to repository" class=md-source data-md-component=source> <div class="md-source__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 6.4.2 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 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> </div> <div class=md-source__repository> nlohmann/json </div> </a> </div> </nav> </header> <div class=md-container data-md-component=container> <nav class=md-tabs aria-label=Tabs data-md-component=tabs> <div class=md-grid> <ul class=md-tabs__list> <li class="md-tabs__item md-tabs__item--active"> <a href=../.. class=md-tabs__link> Home </a> </li> <li class=md-tabs__item> <a href=../../features/arbitrary_types/ class=md-tabs__link> Features </a> </li> <li class=md-tabs__item> <a href=../../integration/ class=md-tabs__link> Integration </a> </li> <li class=md-tabs__item> <a href=../../api/basic_json/ class=md-tabs__link> API Documentation </a> </li> </ul> </div> </nav> <main class=md-main data-md-component=main> <div class="md-main__inner md-grid"> <div class="md-sidebar md-sidebar--primary" data-md-component=sidebar data-md-type=navigation> <div class=md-sidebar__scrollwrap> <div class=md-sidebar__inner> <nav class="md-nav md-nav--primary md-nav--lifted" aria-label=Navigation data-md-level=0> <label class=md-nav__title for=__drawer> <a href=../.. title="JSON for Modern C++" class="md-nav__button md-logo" aria-label="JSON for Modern C++" data-md-component=logo> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54Z"/></svg> </a> JSON for Modern C++ </label> <div class=md-nav__source> <a href=https://github.com/nlohmann/json title="Go to repository" class=md-source data-md-component=source> <div class="md-source__icon md-icon"> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 448 512"><!-- Font Awesome Free 6.4.2 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 2023 Fonticons, Inc.--><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 0 1-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg> </div> <div class=md-source__repository> nlohmann/json </div> </a> </div> <ul class=md-nav__list data-md-scrollfix> <li class="md-nav__item md-nav__item--active md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_1 checked> <div class="md-nav__link md-nav__container"> <a href=../.. class="md-nav__link "> <span class=md-ellipsis> Home </span> </a> <label class="md-nav__link " for=__nav_1 id=__nav_1_label tabindex> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=1 aria-labelledby=__nav_1_label aria-expanded=true> <label class=md-nav__title for=__nav_1> <span class="md-nav__icon md-icon"></span> Home </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../license/ class=md-nav__link> <span class=md-ellipsis> License </span> </a> </li> <li class=md-nav__item> <a href=../code_of_conduct/ class=md-nav__link> <span class=md-ellipsis> Code of Conduct </span> </a> </li> <li class=md-nav__item> <a href=../faq/ class=md-nav__link> <span class=md-ellipsis> FAQ </span> </a> </li> <li class="md-nav__item md-nav__item--active"> <input class="md-nav__toggle md-toggle" type=checkbox id=__toc> <label class="md-nav__link md-nav__link--active" for=__toc> <span class=md-ellipsis> Exceptions </span> <span class="md-nav__icon md-icon"></span> </label> <a href=./ class="md-nav__link md-nav__link--active"> <span class=md-ellipsis> Exceptions </span> </a> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class=md-nav__title for=__toc> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class=md-nav__list data-md-component=toc data-md-scrollfix> <li class=md-nav__item> <a href=#overview class=md-nav__link> Overview </a> <nav class=md-nav aria-label=Overview> <ul class=md-nav__list> <li class=md-nav__item> <a href=#base-type class=md-nav__link> Base type </a> </li> <li class=md-nav__item> <a href=#switch-off-exceptions class=md-nav__link> Switch off exceptions </a> </li> <li class=md-nav__item> <a href=#extended-diagnostic-messages class=md-nav__link> Extended diagnostic messages </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#parse-errors class=md-nav__link> Parse errors </a> <nav class=md-nav aria-label="Parse errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionparse_error101 class=md-nav__link> json.exception.parse_error.101 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error102 class=md-nav__link> json.exception.parse_error.102 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error103 class=md-nav__link> json.exception.parse_error.103 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error104 class=md-nav__link> json.exception.parse_error.104 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error105 class=md-nav__link> json.exception.parse_error.105 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error106 class=md-nav__link> json.exception.parse_error.106 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error107 class=md-nav__link> json.exception.parse_error.107 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error108 class=md-nav__link> json.exception.parse_error.108 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error109 class=md-nav__link> json.exception.parse_error.109 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error110 class=md-nav__link> json.exception.parse_error.110 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error112 class=md-nav__link> json.exception.parse_error.112 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error113 class=md-nav__link> json.exception.parse_error.113 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error114 class=md-nav__link> json.exception.parse_error.114 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error115 class=md-nav__link> json.exception.parse_error.115 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#iterator-errors class=md-nav__link> Iterator errors </a> <nav class=md-nav aria-label="Iterator errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator201 class=md-nav__link> json.exception.invalid_iterator.201 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator202 class=md-nav__link> json.exception.invalid_iterator.202 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator203 class=md-nav__link> json.exception.invalid_iterator.203 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator204 class=md-nav__link> json.exception.invalid_iterator.204 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator205 class=md-nav__link> json.exception.invalid_iterator.205 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator206 class=md-nav__link> json.exception.invalid_iterator.206 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator207 class=md-nav__link> json.exception.invalid_iterator.207 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator208 class=md-nav__link> json.exception.invalid_iterator.208 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator209 class=md-nav__link> json.exception.invalid_iterator.209 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator210 class=md-nav__link> json.exception.invalid_iterator.210 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator211 class=md-nav__link> json.exception.invalid_iterator.211 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator212 class=md-nav__link> json.exception.invalid_iterator.212 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator213 class=md-nav__link> json.exception.invalid_iterator.213 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator214 class=md-nav__link> json.exception.invalid_iterator.214 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#type-errors class=md-nav__link> Type errors </a> <nav class=md-nav aria-label="Type errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptiontype_error301 class=md-nav__link> json.exception.type_error.301 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error302 class=md-nav__link> json.exception.type_error.302 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error303 class=md-nav__link> json.exception.type_error.303 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error304 class=md-nav__link> json.exception.type_error.304 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error305 class=md-nav__link> json.exception.type_error.305 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error306 class=md-nav__link> json.exception.type_error.306 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error307 class=md-nav__link> json.exception.type_error.307 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error308 class=md-nav__link> json.exception.type_error.308 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error309 class=md-nav__link> json.exception.type_error.309 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error310 class=md-nav__link> json.exception.type_error.310 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error311 class=md-nav__link> json.exception.type_error.311 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error312 class=md-nav__link> json.exception.type_error.312 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error313 class=md-nav__link> json.exception.type_error.313 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error314 class=md-nav__link> json.exception.type_error.314 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error315 class=md-nav__link> json.exception.type_error.315 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error316 class=md-nav__link> json.exception.type_error.316 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error317 class=md-nav__link> json.exception.type_error.317 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#out-of-range class=md-nav__link> Out of range </a> <nav class=md-nav aria-label="Out of range"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionout_of_range401 class=md-nav__link> json.exception.out_of_range.401 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range402 class=md-nav__link> json.exception.out_of_range.402 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range403 class=md-nav__link> json.exception.out_of_range.403 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range404 class=md-nav__link> json.exception.out_of_range.404 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range405 class=md-nav__link> json.exception.out_of_range.405 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range406 class=md-nav__link> json.exception.out_of_range.406 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range407 class=md-nav__link> json.exception.out_of_range.407 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range408 class=md-nav__link> json.exception.out_of_range.408 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range409 class=md-nav__link> json.exception.out_of_range.409 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#further-exceptions class=md-nav__link> Further exceptions </a> <nav class=md-nav aria-label="Further exceptions"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionother_error501 class=md-nav__link> json.exception.other_error.501 </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../releases/ class=md-nav__link> <span class=md-ellipsis> Releases </span> </a> </li> <li class=md-nav__item> <a href=../design_goals/ class=md-nav__link> <span class=md-ellipsis> Design goals </span> </a> </li> <li class=md-nav__item> <a href=../sponsors/ class=md-nav__link> <span class=md-ellipsis> Sponsors </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_2> <label class=md-nav__link for=__nav_2 id=__nav_2_label tabindex> <span class=md-ellipsis> Features </span> <span class="md-nav__icon md-icon"></span> </label> <nav class=md-nav data-md-level=1 aria-labelledby=__nav_2_label aria-expanded=false> <label class=md-nav__title for=__nav_2> <span class="md-nav__icon md-icon"></span> Features </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../features/arbitrary_types/ class=md-nav__link> <span class=md-ellipsis> Arbitrary Type Conversions </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_2_2> <div class="md-nav__link md-nav__container"> <a href=../../features/binary_formats/ class="md-nav__link "> <span class=md-ellipsis> Binary Formats </span> </a> <label class="md-nav__link " for=__nav_2_2 id=__nav_2_2_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_2_2_label aria-expanded=false> <label class=md-nav__title for=__nav_2_2> <span class="md-nav__icon md-icon"></span> Binary Formats </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../features/binary_formats/bjdata/ class=md-nav__link> <span class=md-ellipsis> BJData </span> </a> </li> <li class=md-nav__item> <a href=../../features/binary_formats/bson/ class=md-nav__link> <span class=md-ellipsis> BSON </span> </a> </li> <li class=md-nav__item> <a href=../../features/binary_formats/cbor/ class=md-nav__link> <span class=md-ellipsis> CBOR </span> </a> </li> <li class=md-nav__item> <a href=../../features/binary_formats/messagepack/ class=md-nav__link> <span class=md-ellipsis> MessagePack </span> </a> </li> <li class=md-nav__item> <a href=../../features/binary_formats/ubjson/ class=md-nav__link> <span class=md-ellipsis> UBJSON </span> </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../../features/binary_values/ class=md-nav__link> <span class=md-ellipsis> Binary Values </span> </a> </li> <li class=md-nav__item> <a href=../../features/comments/ class=md-nav__link> <span class=md-ellipsis> Comments </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_2_5> <div class="md-nav__link md-nav__container"> <a href=../../features/element_access/ class="md-nav__link "> <span class=md-ellipsis> Element Access </span> </a> <label class="md-nav__link " for=__nav_2_5 id=__nav_2_5_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_2_5_label aria-expanded=false> <label class=md-nav__title for=__nav_2_5> <span class="md-nav__icon md-icon"></span> Element Access </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../features/element_access/unchecked_access/ class=md-nav__link> <span class=md-ellipsis> Unchecked access: operator[] </span> </a> </li> <li class=md-nav__item> <a href=../../features/element_access/checked_access/ class=md-nav__link> <span class=md-ellipsis> Checked access: at </span> </a> </li> <li class=md-nav__item> <a href=../../features/element_access/default_value/ class=md-nav__link> <span class=md-ellipsis> Access with default value: value </span> </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../../features/iterators/ class=md-nav__link> <span class=md-ellipsis> Iterators </span> </a> </li> <li class=md-nav__item> <a href=../../features/json_pointer/ class=md-nav__link> <span class=md-ellipsis> JSON Pointer </span> </a> </li> <li class=md-nav__item> <a href=../../features/json_patch/ class=md-nav__link> <span class=md-ellipsis> JSON Patch and Diff </span> </a> </li> <li class=md-nav__item> <a href=../../features/merge_patch/ class=md-nav__link> <span class=md-ellipsis> JSON Merge Patch </span> </a> </li> <li class=md-nav__item> <a href=../../features/namespace/ class=md-nav__link> <span class=md-ellipsis> nlohmann Namespace </span> </a> </li> <li class=md-nav__item> <a href=../../features/object_order/ class=md-nav__link> <span class=md-ellipsis> Object Order </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_2_12> <div class="md-nav__link md-nav__container"> <a href=../../features/parsing/ class="md-nav__link "> <span class=md-ellipsis> Parsing </span> </a> <label class="md-nav__link " for=__nav_2_12 id=__nav_2_12_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_2_12_label aria-expanded=false> <label class=md-nav__title for=__nav_2_12> <span class="md-nav__icon md-icon"></span> Parsing </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../features/parsing/json_lines/ class=md-nav__link> <span class=md-ellipsis> JSON Lines </span> </a> </li> <li class=md-nav__item> <a href=../../features/parsing/parse_exceptions/ class=md-nav__link> <span class=md-ellipsis> Parsing and Exceptions </span> </a> </li> <li class=md-nav__item> <a href=../../features/parsing/parser_callbacks/ class=md-nav__link> <span class=md-ellipsis> Parser Callbacks </span> </a> </li> <li class=md-nav__item> <a href=../../features/parsing/sax_interface/ class=md-nav__link> <span class=md-ellipsis> SAX Interface </span> </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../../features/assertions/ class=md-nav__link> <span class=md-ellipsis> Runtime Assertions </span> </a> </li> <li class=md-nav__item> <a href=../../features/enum_conversion/ class=md-nav__link> <span class=md-ellipsis> Specializing enum conversion </span> </a> </li> <li class=md-nav__item> <a href=../../features/macros/ class=md-nav__link> <span class=md-ellipsis> Supported Macros </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_2_16> <div class="md-nav__link md-nav__container"> <a href=../../features/types/ class="md-nav__link "> <span class=md-ellipsis> Types </span> </a> <label class="md-nav__link " for=__nav_2_16 id=__nav_2_16_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_2_16_label aria-expanded=false> <label class=md-nav__title for=__nav_2_16> <span class="md-nav__icon md-icon"></span> Types </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../features/types/number_handling/ class=md-nav__link> <span class=md-ellipsis> Number Handling </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_3> <div class="md-nav__link md-nav__container"> <a href=../../integration/ class="md-nav__link "> <span class=md-ellipsis> Integration </span> </a> <label class="md-nav__link " for=__nav_3 id=__nav_3_label tabindex> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=1 aria-labelledby=__nav_3_label aria-expanded=false> <label class=md-nav__title for=__nav_3> <span class="md-nav__icon md-icon"></span> Integration </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../integration/migration_guide/ class=md-nav__link> <span class=md-ellipsis> Migration Guide </span> </a> </li> <li class=md-nav__item> <a href=../../integration/cmake/ class=md-nav__link> <span class=md-ellipsis> CMake </span> </a> </li> <li class=md-nav__item> <a href=../../integration/package_managers/ class=md-nav__link> <span class=md-ellipsis> Package Managers </span> </a> </li> <li class=md-nav__item> <a href=../../integration/pkg-config/ class=md-nav__link> <span class=md-ellipsis> Pkg-config </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--section md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4> <label class=md-nav__link for=__nav_4 id=__nav_4_label tabindex> <span class=md-ellipsis> API Documentation </span> <span class="md-nav__icon md-icon"></span> </label> <nav class=md-nav data-md-level=1 aria-labelledby=__nav_4_label aria-expanded=false> <label class=md-nav__title for=__nav_4> <span class="md-nav__icon md-icon"></span> API Documentation </label> <ul class=md-nav__list data-md-scrollfix> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_1> <div class="md-nav__link md-nav__container"> <a href=../../api/basic_json/ class="md-nav__link "> <span class=md-ellipsis> basic_json </span> </a> <label class="md-nav__link " for=__nav_4_1 id=__nav_4_1_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_1_label aria-expanded=false> <label class=md-nav__title for=__nav_4_1> <span class="md-nav__icon md-icon"></span> basic_json </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/basic_json/basic_json/ class=md-nav__link> <span class=md-ellipsis> (Constructor) </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/~basic_json/ class=md-nav__link> <span class=md-ellipsis> (Destructor) </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/accept/ class=md-nav__link> <span class=md-ellipsis> accept </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/array/ class=md-nav__link> <span class=md-ellipsis> array </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/array_t/ class=md-nav__link> <span class=md-ellipsis> array_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/at/ class=md-nav__link> <span class=md-ellipsis> at </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/back/ class=md-nav__link> <span class=md-ellipsis> back </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/begin/ class=md-nav__link> <span class=md-ellipsis> begin </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/binary/ class=md-nav__link> <span class=md-ellipsis> binary </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/binary_t/ class=md-nav__link> <span class=md-ellipsis> binary_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/boolean_t/ class=md-nav__link> <span class=md-ellipsis> boolean_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/cbegin/ class=md-nav__link> <span class=md-ellipsis> cbegin </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/cbor_tag_handler_t/ class=md-nav__link> <span class=md-ellipsis> cbor_tag_handler_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/cend/ class=md-nav__link> <span class=md-ellipsis> cend </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/clear/ class=md-nav__link> <span class=md-ellipsis> clear </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/contains/ class=md-nav__link> <span class=md-ellipsis> contains </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/count/ class=md-nav__link> <span class=md-ellipsis> count </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/crbegin/ class=md-nav__link> <span class=md-ellipsis> crbegin </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/crend/ class=md-nav__link> <span class=md-ellipsis> crend </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/default_object_comparator_t/ class=md-nav__link> <span class=md-ellipsis> default_object_comparator_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/diff/ class=md-nav__link> <span class=md-ellipsis> diff </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/dump/ class=md-nav__link> <span class=md-ellipsis> dump </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/emplace/ class=md-nav__link> <span class=md-ellipsis> emplace </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/emplace_back/ class=md-nav__link> <span class=md-ellipsis> emplace_back </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/empty/ class=md-nav__link> <span class=md-ellipsis> empty </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/end/ class=md-nav__link> <span class=md-ellipsis> end </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/erase/ class=md-nav__link> <span class=md-ellipsis> erase </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/error_handler_t/ class=md-nav__link> <span class=md-ellipsis> error_handler_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/exception/ class=md-nav__link> <span class=md-ellipsis> exception </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/find/ class=md-nav__link> <span class=md-ellipsis> find </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/flatten/ class=md-nav__link> <span class=md-ellipsis> flatten </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/from_bjdata/ class=md-nav__link> <span class=md-ellipsis> from_bjdata </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/from_bson/ class=md-nav__link> <span class=md-ellipsis> from_bson </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/from_cbor/ class=md-nav__link> <span class=md-ellipsis> from_cbor </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/from_msgpack/ class=md-nav__link> <span class=md-ellipsis> from_msgpack </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/from_ubjson/ class=md-nav__link> <span class=md-ellipsis> from_ubjson </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/front/ class=md-nav__link> <span class=md-ellipsis> front </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get/ class=md-nav__link> <span class=md-ellipsis> get </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get_allocator/ class=md-nav__link> <span class=md-ellipsis> get_allocator </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get_binary/ class=md-nav__link> <span class=md-ellipsis> get_binary </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get_ptr/ class=md-nav__link> <span class=md-ellipsis> get_ptr </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get_ref/ class=md-nav__link> <span class=md-ellipsis> get_ref </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/get_to/ class=md-nav__link> <span class=md-ellipsis> get_to </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/std_hash/ class=md-nav__link> <span class=md-ellipsis> std::hash<basic_json> </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/input_format_t/ class=md-nav__link> <span class=md-ellipsis> input_format_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/insert/ class=md-nav__link> <span class=md-ellipsis> insert </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/invalid_iterator/ class=md-nav__link> <span class=md-ellipsis> invalid_iterator </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_array/ class=md-nav__link> <span class=md-ellipsis> is_array </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_binary/ class=md-nav__link> <span class=md-ellipsis> is_binary </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_boolean/ class=md-nav__link> <span class=md-ellipsis> is_boolean </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_discarded/ class=md-nav__link> <span class=md-ellipsis> is_discarded </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_null/ class=md-nav__link> <span class=md-ellipsis> is_null </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_number/ class=md-nav__link> <span class=md-ellipsis> is_number </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_number_float/ class=md-nav__link> <span class=md-ellipsis> is_number_float </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_number_integer/ class=md-nav__link> <span class=md-ellipsis> is_number_integer </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_number_unsigned/ class=md-nav__link> <span class=md-ellipsis> is_number_unsigned </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_object/ class=md-nav__link> <span class=md-ellipsis> is_object </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_primitive/ class=md-nav__link> <span class=md-ellipsis> is_primitive </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_string/ class=md-nav__link> <span class=md-ellipsis> is_string </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/is_structured/ class=md-nav__link> <span class=md-ellipsis> is_structured </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/items/ class=md-nav__link> <span class=md-ellipsis> items </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/json_base_class_t/ class=md-nav__link> <span class=md-ellipsis> json_base_class_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/json_serializer/ class=md-nav__link> <span class=md-ellipsis> json_serializer </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/max_size/ class=md-nav__link> <span class=md-ellipsis> max_size </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/meta/ class=md-nav__link> <span class=md-ellipsis> meta </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/merge_patch/ class=md-nav__link> <span class=md-ellipsis> merge_patch </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/number_float_t/ class=md-nav__link> <span class=md-ellipsis> number_float_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/number_integer_t/ class=md-nav__link> <span class=md-ellipsis> number_integer_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/number_unsigned_t/ class=md-nav__link> <span class=md-ellipsis> number_unsigned_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/object/ class=md-nav__link> <span class=md-ellipsis> object </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/object_comparator_t/ class=md-nav__link> <span class=md-ellipsis> object_comparator_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/object_t/ class=md-nav__link> <span class=md-ellipsis> object_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_ValueType/ class=md-nav__link> <span class=md-ellipsis> operator ValueType </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_value_t/ class=md-nav__link> <span class=md-ellipsis> operator value_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator%5B%5D/ class=md-nav__link> <span class=md-ellipsis> operator[] </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator%3D/ class=md-nav__link> <span class=md-ellipsis> operator= </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator%2B%3D/ class=md-nav__link> <span class=md-ellipsis> operator+= </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_eq/ class=md-nav__link> <span class=md-ellipsis> operator== </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_ne/ class=md-nav__link> <span class=md-ellipsis> operator!= </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_lt/ class=md-nav__link> <span class=md-ellipsis> operator< </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_gt/ class=md-nav__link> <span class=md-ellipsis> operator> </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_le/ class=md-nav__link> <span class=md-ellipsis> operator<= </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_ge/ class=md-nav__link> <span class=md-ellipsis> operator>= </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/operator_spaceship/ class=md-nav__link> <span class=md-ellipsis> operator<=> </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/out_of_range/ class=md-nav__link> <span class=md-ellipsis> out_of_range </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/other_error/ class=md-nav__link> <span class=md-ellipsis> other_error </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/parse/ class=md-nav__link> <span class=md-ellipsis> parse </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/parse_error/ class=md-nav__link> <span class=md-ellipsis> parse_error </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/parse_event_t/ class=md-nav__link> <span class=md-ellipsis> parse_event_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/parser_callback_t/ class=md-nav__link> <span class=md-ellipsis> parser_callback_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/patch/ class=md-nav__link> <span class=md-ellipsis> patch </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/patch_inplace/ class=md-nav__link> <span class=md-ellipsis> patch_inplace </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/push_back/ class=md-nav__link> <span class=md-ellipsis> push_back </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/rbegin/ class=md-nav__link> <span class=md-ellipsis> rbegin </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/rend/ class=md-nav__link> <span class=md-ellipsis> rend </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/sax_parse/ class=md-nav__link> <span class=md-ellipsis> sax_parse </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/size/ class=md-nav__link> <span class=md-ellipsis> size </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/string_t/ class=md-nav__link> <span class=md-ellipsis> string_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/swap/ class=md-nav__link> <span class=md-ellipsis> swap </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/std_swap/ class=md-nav__link> <span class=md-ellipsis> std::swap<basic_json> </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_bjdata/ class=md-nav__link> <span class=md-ellipsis> to_bjdata </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_bson/ class=md-nav__link> <span class=md-ellipsis> to_bson </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_cbor/ class=md-nav__link> <span class=md-ellipsis> to_cbor </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_msgpack/ class=md-nav__link> <span class=md-ellipsis> to_msgpack </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_string/ class=md-nav__link> <span class=md-ellipsis> to_string </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/to_ubjson/ class=md-nav__link> <span class=md-ellipsis> to_ubjson </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/type/ class=md-nav__link> <span class=md-ellipsis> type </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/type_error/ class=md-nav__link> <span class=md-ellipsis> type_error </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/type_name/ class=md-nav__link> <span class=md-ellipsis> type_name </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/unflatten/ class=md-nav__link> <span class=md-ellipsis> unflatten </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/update/ class=md-nav__link> <span class=md-ellipsis> update </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/value/ class=md-nav__link> <span class=md-ellipsis> value </span> </a> </li> <li class=md-nav__item> <a href=../../api/basic_json/value_t/ class=md-nav__link> <span class=md-ellipsis> value_t </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_2> <div class="md-nav__link md-nav__container"> <a href=../../api/byte_container_with_subtype/ class="md-nav__link "> <span class=md-ellipsis> byte_container_with_subtype </span> </a> <label class="md-nav__link " for=__nav_4_2 id=__nav_4_2_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_2_label aria-expanded=false> <label class=md-nav__title for=__nav_4_2> <span class="md-nav__icon md-icon"></span> byte_container_with_subtype </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/byte_container_with_subtype/byte_container_with_subtype/ class=md-nav__link> <span class=md-ellipsis> (constructor) </span> </a> </li> <li class=md-nav__item> <a href=../../api/byte_container_with_subtype/clear_subtype/ class=md-nav__link> <span class=md-ellipsis> clear_subtype </span> </a> </li> <li class=md-nav__item> <a href=../../api/byte_container_with_subtype/has_subtype/ class=md-nav__link> <span class=md-ellipsis> has_subtype </span> </a> </li> <li class=md-nav__item> <a href=../../api/byte_container_with_subtype/set_subtype/ class=md-nav__link> <span class=md-ellipsis> set_subtype </span> </a> </li> <li class=md-nav__item> <a href=../../api/byte_container_with_subtype/subtype/ class=md-nav__link> <span class=md-ellipsis> subtype </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_3> <div class="md-nav__link md-nav__container"> <a href=../../api/adl_serializer/ class="md-nav__link "> <span class=md-ellipsis> adl_serializer </span> </a> <label class="md-nav__link " for=__nav_4_3 id=__nav_4_3_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_3_label aria-expanded=false> <label class=md-nav__title for=__nav_4_3> <span class="md-nav__icon md-icon"></span> adl_serializer </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/adl_serializer/from_json/ class=md-nav__link> <span class=md-ellipsis> from_json </span> </a> </li> <li class=md-nav__item> <a href=../../api/adl_serializer/to_json/ class=md-nav__link> <span class=md-ellipsis> to_json </span> </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../../api/json/ class=md-nav__link> <span class=md-ellipsis> json </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_5> <div class="md-nav__link md-nav__container"> <a href=../../api/json_pointer/ class="md-nav__link "> <span class=md-ellipsis> json_pointer </span> </a> <label class="md-nav__link " for=__nav_4_5 id=__nav_4_5_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_5_label aria-expanded=false> <label class=md-nav__title for=__nav_4_5> <span class="md-nav__icon md-icon"></span> json_pointer </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/json_pointer/json_pointer/ class=md-nav__link> <span class=md-ellipsis> (Constructor) </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/back/ class=md-nav__link> <span class=md-ellipsis> back </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/empty/ class=md-nav__link> <span class=md-ellipsis> empty </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/operator_string_t/ class=md-nav__link> <span class=md-ellipsis> operator string_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/operator_eq/ class=md-nav__link> <span class=md-ellipsis> operator== </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/operator_ne/ class=md-nav__link> <span class=md-ellipsis> operator!= </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/operator_slash/ class=md-nav__link> <span class=md-ellipsis> operator/ </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/operator_slasheq/ class=md-nav__link> <span class=md-ellipsis> operator/= </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/parent_pointer/ class=md-nav__link> <span class=md-ellipsis> parent_pointer </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/pop_back/ class=md-nav__link> <span class=md-ellipsis> pop_back </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/push_back/ class=md-nav__link> <span class=md-ellipsis> push_back </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/string_t/ class=md-nav__link> <span class=md-ellipsis> string_t </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_pointer/to_string/ class=md-nav__link> <span class=md-ellipsis> to_string </span> </a> </li> </ul> </nav> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_6> <div class="md-nav__link md-nav__container"> <a href=../../api/json_sax/ class="md-nav__link "> <span class=md-ellipsis> json_sax </span> </a> <label class="md-nav__link " for=__nav_4_6 id=__nav_4_6_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_6_label aria-expanded=false> <label class=md-nav__title for=__nav_4_6> <span class="md-nav__icon md-icon"></span> json_sax </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/json_sax/binary/ class=md-nav__link> <span class=md-ellipsis> binary </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/boolean/ class=md-nav__link> <span class=md-ellipsis> boolean </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/end_array/ class=md-nav__link> <span class=md-ellipsis> end_array </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/end_object/ class=md-nav__link> <span class=md-ellipsis> end_object </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/key/ class=md-nav__link> <span class=md-ellipsis> key </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/null/ class=md-nav__link> <span class=md-ellipsis> null </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/number_float/ class=md-nav__link> <span class=md-ellipsis> number_float </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/number_integer/ class=md-nav__link> <span class=md-ellipsis> number_integer </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/number_unsigned/ class=md-nav__link> <span class=md-ellipsis> number_unsigned </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/parse_error/ class=md-nav__link> <span class=md-ellipsis> parse_error </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/start_array/ class=md-nav__link> <span class=md-ellipsis> start_array </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/start_object/ class=md-nav__link> <span class=md-ellipsis> start_object </span> </a> </li> <li class=md-nav__item> <a href=../../api/json_sax/string/ class=md-nav__link> <span class=md-ellipsis> string </span> </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=../../api/operator_ltlt/ class=md-nav__link> <span class=md-ellipsis> operator<<(basic_json) </span> </a> </li> <li class=md-nav__item> <a href=../../api/operator_ltlt/ class=md-nav__link> <span class=md-ellipsis> operator<<(json_pointer) </span> </a> </li> <li class=md-nav__item> <a href=../../api/operator_gtgt/ class=md-nav__link> <span class=md-ellipsis> operator>>(basic_json) </span> </a> </li> <li class=md-nav__item> <a href=../../api/operator_literal_json/ class=md-nav__link> <span class=md-ellipsis> operator""_json </span> </a> </li> <li class=md-nav__item> <a href=../../api/operator_literal_json_pointer/ class=md-nav__link> <span class=md-ellipsis> operator""_json_pointer </span> </a> </li> <li class=md-nav__item> <a href=../../api/ordered_json/ class=md-nav__link> <span class=md-ellipsis> ordered_json </span> </a> </li> <li class=md-nav__item> <a href=../../api/ordered_map/ class=md-nav__link> <span class=md-ellipsis> ordered_map </span> </a> </li> <li class="md-nav__item md-nav__item--nested"> <input class="md-nav__toggle md-toggle " type=checkbox id=__nav_4_14> <div class="md-nav__link md-nav__container"> <a href=../../api/macros/ class="md-nav__link "> <span class=md-ellipsis> macros </span> </a> <label class="md-nav__link " for=__nav_4_14 id=__nav_4_14_label tabindex=0> <span class="md-nav__icon md-icon"></span> </label> </div> <nav class=md-nav data-md-level=2 aria-labelledby=__nav_4_14_label aria-expanded=false> <label class=md-nav__title for=__nav_4_14> <span class="md-nav__icon md-icon"></span> macros </label> <ul class=md-nav__list data-md-scrollfix> <li class=md-nav__item> <a href=../../api/macros/json_assert/ class=md-nav__link> <span class=md-ellipsis> JSON_ASSERT </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_throw_user/ class=md-nav__link> <span class=md-ellipsis> JSON_CATCH_USER </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_diagnostics/ class=md-nav__link> <span class=md-ellipsis> JSON_DIAGNOSTICS </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_disable_enum_serialization/ class=md-nav__link> <span class=md-ellipsis> JSON_DISABLE_ENUM_SERIALIZATION </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_cpp_11/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_CPP_11 </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_cpp_11/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_CPP_14 </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_cpp_11/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_CPP_17 </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_cpp_11/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_CPP_20 </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_filesystem/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_EXPERIMENTAL_FILESYSTEM </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_filesystem/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_FILESYSTEM </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_ranges/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_RANGES </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_static_rtti/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_STATIC_RTTI </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_has_three_way_comparison/ class=md-nav__link> <span class=md-ellipsis> JSON_HAS_THREE_WAY_COMPARISON </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_noexception/ class=md-nav__link> <span class=md-ellipsis> JSON_NOEXCEPTION </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_no_io/ class=md-nav__link> <span class=md-ellipsis> JSON_NO_IO </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_skip_library_version_check/ class=md-nav__link> <span class=md-ellipsis> JSON_SKIP_LIBRARY_VERSION_CHECK </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_skip_unsupported_compiler_check/ class=md-nav__link> <span class=md-ellipsis> JSON_SKIP_UNSUPPORTED_COMPILER_CHECK </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_throw_user/ class=md-nav__link> <span class=md-ellipsis> JSON_THROW_USER </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_throw_user/ class=md-nav__link> <span class=md-ellipsis> JSON_TRY_USER </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_use_global_udls/ class=md-nav__link> <span class=md-ellipsis> JSON_USE_GLOBAL_UDLS </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_use_implicit_conversions/ class=md-nav__link> <span class=md-ellipsis> JSON_USE_IMPLICIT_CONVERSIONS </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/json_use_legacy_discarded_value_comparison/ class=md-nav__link> <span class=md-ellipsis> JSON_USE_LEGACY_DISCARDED_VALUE_COMPARISON </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_define_type_intrusive/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_DEFINE_TYPE_INTRUSIVE </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_define_type_intrusive/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_define_type_non_intrusive/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_define_type_non_intrusive/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_namespace/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_NAMESPACE </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_namespace_begin/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_NAMESPACE_BEGIN </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_namespace_begin/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_NAMESPACE_END </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_namespace_no_version/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_NAMESPACE_NO_VERSION </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_serialize_enum/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_SERIALIZE_ENUM </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_version_major/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_VERSION_MAJOR </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_version_major/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_VERSION_MINOR </span> </a> </li> <li class=md-nav__item> <a href=../../api/macros/nlohmann_json_version_major/ class=md-nav__link> <span class=md-ellipsis> NLOHMANN_JSON_VERSION_PATCH </span> </a> </li> </ul> </nav> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class="md-sidebar md-sidebar--secondary" data-md-component=sidebar data-md-type=toc> <div class=md-sidebar__scrollwrap> <div class=md-sidebar__inner> <nav class="md-nav md-nav--secondary" aria-label="Table of contents"> <label class=md-nav__title for=__toc> <span class="md-nav__icon md-icon"></span> Table of contents </label> <ul class=md-nav__list data-md-component=toc data-md-scrollfix> <li class=md-nav__item> <a href=#overview class=md-nav__link> Overview </a> <nav class=md-nav aria-label=Overview> <ul class=md-nav__list> <li class=md-nav__item> <a href=#base-type class=md-nav__link> Base type </a> </li> <li class=md-nav__item> <a href=#switch-off-exceptions class=md-nav__link> Switch off exceptions </a> </li> <li class=md-nav__item> <a href=#extended-diagnostic-messages class=md-nav__link> Extended diagnostic messages </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#parse-errors class=md-nav__link> Parse errors </a> <nav class=md-nav aria-label="Parse errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionparse_error101 class=md-nav__link> json.exception.parse_error.101 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error102 class=md-nav__link> json.exception.parse_error.102 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error103 class=md-nav__link> json.exception.parse_error.103 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error104 class=md-nav__link> json.exception.parse_error.104 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error105 class=md-nav__link> json.exception.parse_error.105 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error106 class=md-nav__link> json.exception.parse_error.106 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error107 class=md-nav__link> json.exception.parse_error.107 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error108 class=md-nav__link> json.exception.parse_error.108 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error109 class=md-nav__link> json.exception.parse_error.109 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error110 class=md-nav__link> json.exception.parse_error.110 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error112 class=md-nav__link> json.exception.parse_error.112 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error113 class=md-nav__link> json.exception.parse_error.113 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error114 class=md-nav__link> json.exception.parse_error.114 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionparse_error115 class=md-nav__link> json.exception.parse_error.115 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#iterator-errors class=md-nav__link> Iterator errors </a> <nav class=md-nav aria-label="Iterator errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator201 class=md-nav__link> json.exception.invalid_iterator.201 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator202 class=md-nav__link> json.exception.invalid_iterator.202 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator203 class=md-nav__link> json.exception.invalid_iterator.203 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator204 class=md-nav__link> json.exception.invalid_iterator.204 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator205 class=md-nav__link> json.exception.invalid_iterator.205 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator206 class=md-nav__link> json.exception.invalid_iterator.206 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator207 class=md-nav__link> json.exception.invalid_iterator.207 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator208 class=md-nav__link> json.exception.invalid_iterator.208 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator209 class=md-nav__link> json.exception.invalid_iterator.209 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator210 class=md-nav__link> json.exception.invalid_iterator.210 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator211 class=md-nav__link> json.exception.invalid_iterator.211 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator212 class=md-nav__link> json.exception.invalid_iterator.212 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator213 class=md-nav__link> json.exception.invalid_iterator.213 </a> </li> <li class=md-nav__item> <a href=#jsonexceptioninvalid_iterator214 class=md-nav__link> json.exception.invalid_iterator.214 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#type-errors class=md-nav__link> Type errors </a> <nav class=md-nav aria-label="Type errors"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptiontype_error301 class=md-nav__link> json.exception.type_error.301 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error302 class=md-nav__link> json.exception.type_error.302 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error303 class=md-nav__link> json.exception.type_error.303 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error304 class=md-nav__link> json.exception.type_error.304 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error305 class=md-nav__link> json.exception.type_error.305 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error306 class=md-nav__link> json.exception.type_error.306 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error307 class=md-nav__link> json.exception.type_error.307 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error308 class=md-nav__link> json.exception.type_error.308 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error309 class=md-nav__link> json.exception.type_error.309 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error310 class=md-nav__link> json.exception.type_error.310 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error311 class=md-nav__link> json.exception.type_error.311 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error312 class=md-nav__link> json.exception.type_error.312 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error313 class=md-nav__link> json.exception.type_error.313 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error314 class=md-nav__link> json.exception.type_error.314 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error315 class=md-nav__link> json.exception.type_error.315 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error316 class=md-nav__link> json.exception.type_error.316 </a> </li> <li class=md-nav__item> <a href=#jsonexceptiontype_error317 class=md-nav__link> json.exception.type_error.317 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#out-of-range class=md-nav__link> Out of range </a> <nav class=md-nav aria-label="Out of range"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionout_of_range401 class=md-nav__link> json.exception.out_of_range.401 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range402 class=md-nav__link> json.exception.out_of_range.402 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range403 class=md-nav__link> json.exception.out_of_range.403 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range404 class=md-nav__link> json.exception.out_of_range.404 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range405 class=md-nav__link> json.exception.out_of_range.405 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range406 class=md-nav__link> json.exception.out_of_range.406 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range407 class=md-nav__link> json.exception.out_of_range.407 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range408 class=md-nav__link> json.exception.out_of_range.408 </a> </li> <li class=md-nav__item> <a href=#jsonexceptionout_of_range409 class=md-nav__link> json.exception.out_of_range.409 </a> </li> </ul> </nav> </li> <li class=md-nav__item> <a href=#further-exceptions class=md-nav__link> Further exceptions </a> <nav class=md-nav aria-label="Further exceptions"> <ul class=md-nav__list> <li class=md-nav__item> <a href=#jsonexceptionother_error501 class=md-nav__link> json.exception.other_error.501 </a> </li> </ul> </nav> </li> </ul> </nav> </div> </div> </div> <div class=md-content data-md-component=content> <article class="md-content__inner md-typeset"> <h1 id=exceptions>Exceptions<a class=headerlink href=#exceptions title="Permanent link">¶</a></h1> <h2 id=overview>Overview<a class=headerlink href=#overview title="Permanent link">¶</a></h2> <h3 id=base-type>Base type<a class=headerlink href=#base-type title="Permanent link">¶</a></h3> <p>All exceptions inherit from class <code>json::exception</code> (which in turn inherits from <code>std::exception</code>). It is used as the base class for all exceptions thrown by the <code>basic_json</code> class. This class can hence be used as "wildcard" to catch exceptions.</p> <p><img src=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXMtYXNjaWkiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiBjb250ZW50U3R5bGVUeXBlPSJ0ZXh0L2NzcyIgaGVpZ2h0PSIy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xLDQ5MS4xMywxNjguMTgiIHN0eWxlPSJzdHJva2U6IzE4MTgxODtzdHJva2Utd2lkdGg6MS4wOyIvPjwvZz48IS0tcmV2ZXJzZSBsaW5rIGpzb24gdG8ganNvbi0tPjxnIGlkPSJsaW5rX2pzb25fanNvbiI+PHBhdGggY29kZUxpbmU9IjYiIGQ9Ik01MDguNzA0MiwxNjIuNDgyNSBDNTgzLjA3NDIsMTQzLjM4MjUgNjY2LjUsMTUyLjI4IDY2Ni41LDE4MC4yMiBDNjY2LjUsMjA4LjE1IDU2NS42NCwyMTIuNTcgNDkxLjI3LDE5My40NyAiIGZpbGw9Im5vbmUiIGlkPSJqc29uLWJhY2t0by1qc29uLTQiIHN0eWxlPSJzdHJva2U6IzE4MTgxODtzdHJva2Utd2lkdGg6MS4wOyIvPjxwb2x5Z29uIGZpbGw9Im5vbmUiIHBvaW50cz0iNDkxLjI3LDE2Ni45Niw1MTAuMTk2NywxNjguMjkzOSw1MDcuMjExNywxNTYuNjcxMSw0OTEuMjcsMTY2Ljk2IiBzdHlsZT0ic3Ryb2tlOiMxODE4MTg7c3Ryb2tlLXdpZHRoOjEuMDsiLz48L2c+PCEtLVNSQz1bWlAxOTNlQ20zNE50RmVNTjdTRzVLRXlJa1M2S0wyWDFqWmkwdlV2NVJIVUcxUWZ0X2RmdzdqSWdpa0lkdnl2MllkWHc1R0xVRFNMNTI1Y19YM2VJUFNTWUlSUW00RV9LWGllNU9vN1JQZ3RsX1oyY2N4YktFdzV1dUt0RTZmUVYzYUFTdnpWYTZOTHp6WlcxLTlQS3l6am4xOXBoWTN2NURQbTU2QWZMdjFrSTBwdVFpanQtNnE0Y01fbWVxdHNzcTMybUNwcHRuWjJ6MEcwMF0tLT48L2c+PC9zdmc+ class=uml alt="uml diagram" title></p> <h3 id=switch-off-exceptions>Switch off exceptions<a class=headerlink href=#switch-off-exceptions title="Permanent link">¶</a></h3> <p>Exceptions are used widely within the library. They can, however, be switched off with either using the compiler flag <code>-fno-exceptions</code> or by defining the symbol <a href=../../api/macros/json_noexception/ ><code>JSON_NOEXCEPTION</code></a>. In this case, exceptions are replaced by <code>abort()</code> calls. You can further control this behavior by defining <code>JSON_THROW_USER</code> (overriding <code class=highlight><span class=k>throw</span></code>), <code>JSON_TRY_USER</code> (overriding <code class=highlight><span class=k>try</span></code>), and <code>JSON_CATCH_USER</code> (overriding <code class=highlight><span class=k>catch</span></code>).</p> <p>Note that <a href=../../api/macros/json_throw_user/ ><code>JSON_THROW_USER</code></a> should leave the current scope (e.g., by throwing or aborting), as continuing after it may yield undefined behavior.</p> <details class=example> <summary>Example</summary> <p>The code below switches off exceptions and creates a log entry with a detailed error message in case of errors.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| |
| <span class=cp>#define JSON_TRY_USER if(true)</span> |
| <span class=cp>#define JSON_CATCH_USER(exception) if(false)</span> |
| <span class=cp>#define JSON_THROW_USER(exception) \</span> |
| <span class=cp> {std::clog << "Error in " << __FILE__ << ":" << __LINE__ \</span> |
| <span class=cp> << " (function " << __FUNCTION__ << ") - " \</span> |
| <span class=cp> << (exception).what() << std::endl; \</span> |
| <span class=cp> std::abort();}</span> |
| |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| </code></pre></div> </details> <p>Note the explanatory <a href=https://en.cppreference.com/w/cpp/error/exception/what><code>what()</code></a> string of exceptions is not available for MSVC if exceptions are disabled, see <a href=https://github.com/nlohmann/json/discussions/2824>#2824</a>.</p> <p>See <a href=../../api/macros/json_throw_user/ >documentation of <code>JSON_TRY_USER</code>, <code>JSON_CATCH_USER</code> and <code>JSON_THROW_USER</code></a> for more information.</p> <h3 id=extended-diagnostic-messages>Extended diagnostic messages<a class=headerlink href=#extended-diagnostic-messages title="Permanent link">¶</a></h3> <p>Exceptions in the library are thrown in the local context of the JSON value they are detected. This makes detailed diagnostics messages, and hence debugging, difficult.</p> <details class=example> <summary>Example</summary> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=p>;</span> |
| <span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"street"</span><span class=p>]</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"Fake Street"</span><span class=p>;</span> |
| <span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"housenumber"</span><span class=p>]</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"12"</span><span class=p>;</span> |
| |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=kt>int</span><span class=w> </span><span class=n>housenumber</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"housenumber"</span><span class=p>];</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>exception</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.302] type must be number, but is string |
| </code></pre></div> <p>This exception can be hard to debug if storing the value <code class=highlight><span class=s>"12"</span></code> and accessing it is further apart.</p> </details> <p>To create better diagnostics messages, each JSON value needs a pointer to its parent value such that a global context (i.e., a path from the root value to the value that lead to the exception) can be created. That global context is provided as <a href=../../features/json_pointer/ >JSON Pointer</a>.</p> <p>As this global context comes at the price of storing one additional pointer per JSON value and runtime overhead to maintain the parent relation, extended diagnostics are disabled by default. They can, however, be enabled by defining the preprocessor symbol <a href=../../api/macros/json_diagnostics/ ><code>JSON_DIAGNOSTICS</code></a> to <code>1</code> before including <code>json.hpp</code>.</p> <details class=example> <summary>Example</summary> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| |
| <span class=cp># define JSON_DIAGNOSTICS 1</span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=p>;</span> |
| <span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"street"</span><span class=p>]</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"Fake Street"</span><span class=p>;</span> |
| <span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"housenumber"</span><span class=p>]</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"12"</span><span class=p>;</span> |
| |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=kt>int</span><span class=w> </span><span class=n>housenumber</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>j</span><span class=p>[</span><span class=s>"address"</span><span class=p>][</span><span class=s>"housenumber"</span><span class=p>];</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>exception</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.302] (/address/housenumber) type must be number, but is string |
| </code></pre></div> <p>Now the exception message contains a JSON Pointer <code>/address/housenumber</code> that indicates which value has the wrong type.</p> </details> <p>See <a href=../../api/macros/json_diagnostics/ >documentation of <code>JSON_DIAGNOSTICS</code></a> for more information.</p> <h2 id=parse-errors>Parse errors<a class=headerlink href=#parse-errors title="Permanent link">¶</a></h2> <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>Exceptions have ids 1xx.</p> <div class="admonition info"> <p class=admonition-title>Byte index</p> <p>Member <code>byte</code> holds the byte index of the last read character in the input file.</p> <p>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).</p> </div> <details class=example> <summary>Example</summary> <p>The following code shows how a <code>parse_error</code> exception can be caught.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// parsing input with a syntax error</span> |
| <span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>parse</span><span class=p>(</span><span class=s>"[1,2,3,]"</span><span class=p>);</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>parse_error</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// output exception information</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"message: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"exception id: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>id</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"byte position of error: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>byte</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>endl</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>message: [json.exception.parse_error.101] parse error at line 1, column 8: syntax error while parsing value - unexpected ']'; expected '[', '{', or a literal |
| exception id: 101 |
| byte position of error: 8 |
| </code></pre></div> </details> <h3 id=jsonexceptionparse_error101>json.exception.parse_error.101<a class=headerlink href=#jsonexceptionparse_error101 title="Permanent link">¶</a></h3> <p>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 <code>byte</code> indicates the error position.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p>Input ended prematurely:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at 2: unexpected end of input; expected string literal |
| </code></pre></div> <p>No input:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 1: attempting to parse an empty input; check that your input string or stream contains the expected JSON |
| </code></pre></div> <p>Control character was not escaped:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid string: control character U+0009 (HT) must be escaped to \u0009 or \\; last read: '"<U+0009>'" |
| </code></pre></div> <p>String was not closed:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 2: syntax error while parsing value - invalid string: missing closing quote; last read: '"' |
| </code></pre></div> <p>Invalid number format:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 3: syntax error while parsing value - invalid number; expected '+', '-', or digit after exponent; last read: '1E' |
| </code></pre></div> <p><code>\u</code> was not be followed by four hex digits:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 6: syntax error while parsing value - invalid string: '\u' must be followed by 4 hex digits; last read: '"\u01"' |
| </code></pre></div> <p>Invalid UTF-8 surrogate pair:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 1, column 13: syntax error while parsing value - invalid string: surrogate U+DC00..U+DFFF must follow U+D800..U+DBFF; last read: '"\uD7FF\uDC00'" |
| </code></pre></div> <p>Invalid UTF-8 byte:</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.101] parse error at line 3, column 24: syntax error while parsing value - invalid string: ill-formed UTF-8 byte; last read: '"vous \352t' |
| </code></pre></div> </div> <div class="admonition tip"> <p class=admonition-title>Tip</p> <ul> <li>Make sure the input is correctly read. Try to write the input to standard output to check if, for instance, the input file was successfully opened.</li> <li>Paste the input to a JSON validator like <a href=http://jsonlint.com>http://jsonlint.com</a> or a tool like <a href=https://stedolan.github.io/jq/ >jq</a>.</li> </ul> </div> <h3 id=jsonexceptionparse_error102>json.exception.parse_error.102<a class=headerlink href=#jsonexceptionparse_error102 title="Permanent link">¶</a></h3> <p>JSON uses the <code>\uxxxx</code> format to describe Unicode characters. Code points 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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>parse error at 14: missing or wrong low surrogate |
| </code></pre></div> </div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>This exception is not used any more. Instead <a href=#jsonexceptionparse_error101>json.exception.parse_error.101</a> with a more detailed description is used.</p> </div> <h3 id=jsonexceptionparse_error103>json.exception.parse_error.103<a class=headerlink href=#jsonexceptionparse_error103 title="Permanent link">¶</a></h3> <p>Unicode supports code points up to 0x10FFFF. Code points above 0x10FFFF are invalid.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>parse error: code points above 0x10FFFF are invalid |
| </code></pre></div> </div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>This exception is not used any more. Instead <a href=#jsonexceptionparse_error101>json.exception.parse_error.101</a> with a more detailed description is used.</p> </div> <h3 id=jsonexceptionparse_error104>json.exception.parse_error.104<a class=headerlink href=#jsonexceptionparse_error104 title="Permanent link">¶</a></h3> <p><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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.104] parse error: JSON patch must be an array of objects |
| </code></pre></div> </div> <h3 id=jsonexceptionparse_error105>json.exception.parse_error.105<a class=headerlink href=#jsonexceptionparse_error105 title="Permanent link">¶</a></h3> <p>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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p><div class=highlight><pre><span></span><code>[json.exception.parse_error.105] parse error: operation 'add' must have member 'value' |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.105] parse error: operation 'copy' must have string member 'from' |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.105] parse error: operation value 'foo' is invalid |
| </code></pre></div></p> </div> <h3 id=jsonexceptionparse_error106>json.exception.parse_error.106<a class=headerlink href=#jsonexceptionparse_error106 title="Permanent link">¶</a></h3> <p>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>.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.106] parse error: array index '01' must not begin with '0' |
| </code></pre></div> </div> <h3 id=jsonexceptionparse_error107>json.exception.parse_error.107<a class=headerlink href=#jsonexceptionparse_error107 title="Permanent link">¶</a></h3> <p>A JSON Pointer must be a Unicode string containing a sequence of zero or more reference tokens, each prefixed by a <code>/</code> character.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.107] parse error at byte 1: JSON pointer must be empty or begin with '/' - was: 'foo' |
| </code></pre></div> </div> <h3 id=jsonexceptionparse_error108>json.exception.parse_error.108<a class=headerlink href=#jsonexceptionparse_error108 title="Permanent link">¶</a></h3> <p>In a JSON Pointer, only <code>~0</code> and <code>~1</code> are valid escape sequences.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.108] parse error: escape character '~' must be followed with '0' or '1' |
| </code></pre></div> </div> <h3 id=jsonexceptionparse_error109>json.exception.parse_error.109<a class=headerlink href=#jsonexceptionparse_error109 title="Permanent link">¶</a></h3> <p>A JSON Pointer array index must be a number.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.parse_error.109] parse error: array index 'one' is not a number |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.109] parse error: array index '+1' is not a number |
| </code></pre></div></p> </div> <h3 id=jsonexceptionparse_error110>json.exception.parse_error.110<a class=headerlink href=#jsonexceptionparse_error110 title="Permanent link">¶</a></h3> <p>When parsing CBOR or MessagePack, the byte vector ends before the complete value has been read.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p><div class=highlight><pre><span></span><code>[json.exception.parse_error.110] parse error at byte 5: syntax error while parsing CBOR string: unexpected end of input |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.110] parse error at byte 2: syntax error while parsing UBJSON value: expected end of input; last byte: 0x5A |
| </code></pre></div></p> </div> <h3 id=jsonexceptionparse_error112>json.exception.parse_error.112<a class=headerlink href=#jsonexceptionparse_error112 title="Permanent link">¶</a></h3> <p>An unexpected byte was read in a <a href=../../features/binary_formats/ >binary format</a> or length information is invalid (<a href=../../features/binary_formats/bson/ >BSON</a>).</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 1: syntax error while parsing CBOR value: invalid byte: 0x1C |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 1: syntax error while parsing MessagePack value: invalid byte: 0xC1 |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 4: syntax error while parsing BJData size: expected '#' after type information; last byte: 0x02 |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 4: syntax error while parsing UBJSON size: expected '#' after type information; last byte: 0x02 |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 10: syntax error while parsing BSON string: string length must be at least 1, is -2147483648 |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.112] parse error at byte 15: syntax error while parsing BSON binary: byte array length cannot be negative, is -1 |
| </code></pre></div></p> </div> <h3 id=jsonexceptionparse_error113>json.exception.parse_error.113<a class=headerlink href=#jsonexceptionparse_error113 title="Permanent link">¶</a></h3> <p>While parsing a map key, a value that is not a string has been read.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing CBOR string: expected length specification (0x60-0x7B) or indefinite string type (0x7F); last byte: 0xFF |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing MessagePack string: expected length specification (0xA0-0xBF, 0xD9-0xDB); last byte: 0xFF |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.parse_error.113] parse error at byte 2: syntax error while parsing UBJSON char: byte after 'C' must be in range 0x00..0x7F; last byte: 0x82 |
| </code></pre></div></p> </div> <h3 id=jsonexceptionparse_error114>json.exception.parse_error.114<a class=headerlink href=#jsonexceptionparse_error114 title="Permanent link">¶</a></h3> <p>The parsing of the corresponding BSON record type is not implemented (yet).</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.114] parse error at byte 5: Unsupported BSON record type 0xFF |
| </code></pre></div> </div> <h3 id=jsonexceptionparse_error115>json.exception.parse_error.115<a class=headerlink href=#jsonexceptionparse_error115 title="Permanent link">¶</a></h3> <p>A UBJSON high-precision number could not be parsed.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.parse_error.115] parse error at byte 5: syntax error while parsing UBJSON high-precision number: invalid number text: 1A |
| </code></pre></div> </div> <h2 id=iterator-errors>Iterator errors<a class=headerlink href=#iterator-errors title="Permanent link">¶</a></h2> <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> <details class=example> <summary>Example</summary> <p>The following code shows how an <code>invalid_iterator</code> exception can be caught.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// calling iterator::key() on non-object iterator</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"string"</span><span class=p>;</span> |
| <span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>iterator</span><span class=w> </span><span class=n>it</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>j</span><span class=p>.</span><span class=n>begin</span><span class=p>();</span> |
| <span class=w> </span><span class=k>auto</span><span class=w> </span><span class=n>k</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>it</span><span class=p>.</span><span class=n>key</span><span class=p>();</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>invalid_iterator</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// output exception information</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"message: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"exception id: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>id</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>endl</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>message: [json.exception.invalid_iterator.207] cannot use key() for non-object iterators |
| exception id: 207 |
| </code></pre></div> </details> <h3 id=jsonexceptioninvalid_iterator201>json.exception.invalid_iterator.201<a class=headerlink href=#jsonexceptioninvalid_iterator201 title="Permanent link">¶</a></h3> <p>The iterators passed to constructor <code>basic_json(InputIT first, InputIT last)</code> are not compatible, meaning they do not belong to the same container. Therefore, the range (<code>first</code>, <code>last</code>) is invalid.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.201] iterators are not compatible |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator202>json.exception.invalid_iterator.202<a class=headerlink href=#jsonexceptioninvalid_iterator202 title="Permanent link">¶</a></h3> <p>In the <a href=../../api/basic_json/erase/ >erase</a> or insert function, the passed iterator <code>pos</code> 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.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.202] iterator does not fit current value |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.202] iterators first and last must point to objects |
| </code></pre></div></p> </div> <h3 id=jsonexceptioninvalid_iterator203>json.exception.invalid_iterator.203<a class=headerlink href=#jsonexceptioninvalid_iterator203 title="Permanent link">¶</a></h3> <p>Either iterator passed to function <a href=../../api/basic_json/erase/ ><code>erase(IteratorType first, IteratorType last</code>)</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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.203] iterators do not fit current value |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator204>json.exception.invalid_iterator.204<a class=headerlink href=#jsonexceptioninvalid_iterator204 title="Permanent link">¶</a></h3> <p>When an iterator range for a primitive type (number, boolean, or string) is passed to a constructor or an <a href=../../api/basic_json/erase/ >erase</a> function, this range has to be exactly (<code>begin(),</code> <code>end()),</code> because this is the only way the single stored value is expressed. All other ranges are invalid.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.204] iterators out of range |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator205>json.exception.invalid_iterator.205<a class=headerlink href=#jsonexceptioninvalid_iterator205 title="Permanent link">¶</a></h3> <p>When an iterator for a primitive type (number, boolean, or string) is passed to an <a href=../../api/basic_json/erase/ >erase</a> function, the iterator has to be the <code>begin()</code> iterator, because it is the only way to address the stored value. All other iterators are invalid.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.205] iterator out of range |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator206>json.exception.invalid_iterator.206<a class=headerlink href=#jsonexceptioninvalid_iterator206 title="Permanent link">¶</a></h3> <p>The iterators passed to constructor <code>basic_json(InputIT first, InputIT last)</code> belong to a JSON null value and hence to not define a valid range.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.206] cannot construct with iterators from null |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator207>json.exception.invalid_iterator.207<a class=headerlink href=#jsonexceptioninvalid_iterator207 title="Permanent link">¶</a></h3> <p>The <code>key()</code> member function can only be used on iterators belonging to a JSON object, because other types do not have a concept of a key.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.207] cannot use key() for non-object iterators |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator208>json.exception.invalid_iterator.208<a class=headerlink href=#jsonexceptioninvalid_iterator208 title="Permanent link">¶</a></h3> <p>The <code>operator[]</code> to specify a concrete offset cannot be used on iterators belonging to a JSON object, because JSON objects are unordered.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.208] cannot use operator[] for object iterators |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator209>json.exception.invalid_iterator.209<a class=headerlink href=#jsonexceptioninvalid_iterator209 title="Permanent link">¶</a></h3> <p>The offset operators (<code>+</code>, <code>-</code>, <code>+=</code>, <code>-=</code>) cannot be used on iterators belonging to a JSON object, because JSON objects are unordered.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.209] cannot use offsets with object iterators |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator210>json.exception.invalid_iterator.210<a class=headerlink href=#jsonexceptioninvalid_iterator210 title="Permanent link">¶</a></h3> <p>The iterator range passed to the insert function are not compatible, meaning they do not belong to the same container. Therefore, the range (<code>first</code>, <code>last</code>) is invalid.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.210] iterators do not fit |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator211>json.exception.invalid_iterator.211<a class=headerlink href=#jsonexceptioninvalid_iterator211 title="Permanent link">¶</a></h3> <p>The iterator range passed to the insert function must not be a subrange of the container to insert to.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.211] passed iterators may not belong to container |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator212>json.exception.invalid_iterator.212<a class=headerlink href=#jsonexceptioninvalid_iterator212 title="Permanent link">¶</a></h3> <p>When two iterators are compared, they must belong to the same container.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.212] cannot compare iterators of different containers |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator213>json.exception.invalid_iterator.213<a class=headerlink href=#jsonexceptioninvalid_iterator213 title="Permanent link">¶</a></h3> <p>The order of object iterators cannot be compared, because JSON objects are unordered.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.213] cannot compare order of object iterators |
| </code></pre></div> </div> <h3 id=jsonexceptioninvalid_iterator214>json.exception.invalid_iterator.214<a class=headerlink href=#jsonexceptioninvalid_iterator214 title="Permanent link">¶</a></h3> <p>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 <code>begin()</code>.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.invalid_iterator.214] cannot get value |
| </code></pre></div> </div> <h2 id=type-errors>Type errors<a class=headerlink href=#type-errors title="Permanent link">¶</a></h2> <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> <details class=example> <summary>Example</summary> <p>The following code shows how a <code>type_error</code> exception can be caught.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// calling push_back() on a string value</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=s>"string"</span><span class=p>;</span> |
| <span class=w> </span><span class=n>j</span><span class=p>.</span><span class=n>push_back</span><span class=p>(</span><span class=s>"another string"</span><span class=p>);</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>type_error</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// output exception information</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"message: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"exception id: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>id</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>endl</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>message: [json.exception.type_error.308] cannot use push_back() with string |
| exception id: 308 |
| </code></pre></div> </details> <h3 id=jsonexceptiontype_error301>json.exception.type_error.301<a class=headerlink href=#jsonexceptiontype_error301 title="Permanent link">¶</a></h3> <p>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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.301] cannot create object from initializer list |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error302>json.exception.type_error.302<a class=headerlink href=#jsonexceptiontype_error302 title="Permanent link">¶</a></h3> <p>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.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.302] type must be object, but is null |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.302] type must be string, but is object |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error303>json.exception.type_error.303<a class=headerlink href=#jsonexceptiontype_error303 title="Permanent link">¶</a></h3> <p>To retrieve a reference to a value stored in a <code>basic_json</code> object with <code>get_ref</code>, the type of the reference must match the value type. For instance, for a JSON array, the <code>ReferenceType</code> must be <code>array_t &</code>.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.303] incompatible ReferenceType for get_ref, actual type is object |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.303] incompatible ReferenceType for get_ref, actual type is number" |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error304>json.exception.type_error.304<a class=headerlink href=#jsonexceptiontype_error304 title="Permanent link">¶</a></h3> <p>The <code>at()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.304] cannot use at() with string |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.304] cannot use at() with number |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error305>json.exception.type_error.305<a class=headerlink href=#jsonexceptiontype_error305 title="Permanent link">¶</a></h3> <p>The <code>operator[]</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.305] cannot use operator[] with a string argument with array |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.305] cannot use operator[] with a numeric argument with object |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error306>json.exception.type_error.306<a class=headerlink href=#jsonexceptiontype_error306 title="Permanent link">¶</a></h3> <p>The <code>value()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.306] cannot use value() with number |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error307>json.exception.type_error.307<a class=headerlink href=#jsonexceptiontype_error307 title="Permanent link">¶</a></h3> <p>The <a href=../../api/basic_json/erase/ ><code>erase()</code></a> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.307] cannot use erase() with string |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error308>json.exception.type_error.308<a class=headerlink href=#jsonexceptiontype_error308 title="Permanent link">¶</a></h3> <p>The <code>push_back()</code> and <code>operator+=</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.308] cannot use push_back() with string |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error309>json.exception.type_error.309<a class=headerlink href=#jsonexceptiontype_error309 title="Permanent link">¶</a></h3> <p>The <code>insert()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.309] cannot use insert() with array |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.309] cannot use insert() with number |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error310>json.exception.type_error.310<a class=headerlink href=#jsonexceptiontype_error310 title="Permanent link">¶</a></h3> <p>The <code>swap()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.310] cannot use swap() with number |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error311>json.exception.type_error.311<a class=headerlink href=#jsonexceptiontype_error311 title="Permanent link">¶</a></h3> <p>The <code>emplace()</code> and <code>emplace_back()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p><div class=highlight><pre><span></span><code>[json.exception.type_error.311] cannot use emplace() with number |
| </code></pre></div> <div class=highlight><pre><span></span><code>[json.exception.type_error.311] cannot use emplace_back() with number |
| </code></pre></div></p> </div> <h3 id=jsonexceptiontype_error312>json.exception.type_error.312<a class=headerlink href=#jsonexceptiontype_error312 title="Permanent link">¶</a></h3> <p>The <code>update()</code> member functions can only be executed for certain JSON types.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.312] cannot use update() with array |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error313>json.exception.type_error.313<a class=headerlink href=#jsonexceptiontype_error313 title="Permanent link">¶</a></h3> <p>The <code>unflatten</code> 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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.313] invalid value to unflatten |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error314>json.exception.type_error.314<a class=headerlink href=#jsonexceptiontype_error314 title="Permanent link">¶</a></h3> <p>The <code>unflatten</code> function only works for an object whose keys are JSON Pointers.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p>Calling <code>unflatten()</code> on an array <code class=highlight><span class=p>[</span><span class=mi>1</span><span class=p>,</span><span class=mi>2</span><span class=p>,</span><span class=mi>3</span><span class=p>]</span></code>:</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.314] only objects can be unflattened |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error315>json.exception.type_error.315<a class=headerlink href=#jsonexceptiontype_error315 title="Permanent link">¶</a></h3> <p>The <code>unflatten()</code> function only works for an object whose keys are JSON Pointers and whose values are primitive.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p>Calling <code>unflatten()</code> on an object <code class=highlight><span class=p>{</span><span class=s2>"/1"</span><span class=p>,</span><span class=w> </span><span class=p>[</span><span class=mi>1</span><span class=p>,</span><span class=mi>2</span><span class=p>,</span><span class=mi>3</span><span class=p>]}</span></code>:</p> <div class=highlight><pre><span></span><code>[json.exception.type_error.315] values in object must be primitive |
| </code></pre></div> </div> <h3 id=jsonexceptiontype_error316>json.exception.type_error.316<a class=headerlink href=#jsonexceptiontype_error316 title="Permanent link">¶</a></h3> <p>The <code>dump()</code> 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.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <p>Calling <code>dump()</code> on a JSON value containing an ISO 8859-1 encoded string: <div class=highlight><pre><span></span><code>[json.exception.type_error.316] invalid UTF-8 byte at index 15: 0x6F |
| </code></pre></div></p> </div> <div class="admonition tip"> <p class=admonition-title>Tip</p> <ul> <li>Store the source file with UTF-8 encoding.</li> <li>Pass an error handler as last parameter to the <code>dump()</code> function to avoid this exception:<ul> <li><code>json::error_handler_t::replace</code> will replace invalid bytes sequences with <code>U+FFFD</code> </li> <li><code>json::error_handler_t::ignore</code> will silently ignore invalid byte sequences</li> </ul> </li> </ul> </div> <h3 id=jsonexceptiontype_error317>json.exception.type_error.317<a class=headerlink href=#jsonexceptiontype_error317 title="Permanent link">¶</a></h3> <p>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)</p> <div class="admonition failure"> <p class=admonition-title>Example messages</p> <p>Serializing <code class=highlight><span class=kc>null</span></code> to BSON: <div class=highlight><pre><span></span><code>[json.exception.type_error.317] to serialize to BSON, top-level type must be object, but is null |
| </code></pre></div> Serializing <code class=highlight><span class=p>[</span><span class=mi>1</span><span class=p>,</span><span class=mi>2</span><span class=p>,</span><span class=mi>3</span><span class=p>]</span></code> to BSON: <div class=highlight><pre><span></span><code>[json.exception.type_error.317] to serialize to BSON, top-level type must be object, but is array |
| </code></pre></div></p> </div> <div class="admonition tip"> <p class=admonition-title>Tip</p> <p>Encapsulate the JSON value in an object. That is, instead of serializing <code class=highlight><span class=kc>true</span></code>, serialize <code class=highlight><span class=p>{</span><span class=nt>"value"</span><span class=p>:</span><span class=w> </span><span class=kc>true</span><span class=p>}</span></code></p> </div> <h2 id=out-of-range>Out of range<a class=headerlink href=#out-of-range title="Permanent link">¶</a></h2> <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> <details class=example> <summary>Example</summary> <p>The following code shows how an <code>out_of_range</code> exception can be caught.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// calling at() for an invalid index</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=p>{</span><span class=mi>1</span><span class=p>,</span><span class=w> </span><span class=mi>2</span><span class=p>,</span><span class=w> </span><span class=mi>3</span><span class=p>,</span><span class=w> </span><span class=mi>4</span><span class=p>};</span> |
| <span class=w> </span><span class=n>j</span><span class=p>.</span><span class=n>at</span><span class=p>(</span><span class=mi>4</span><span class=p>)</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=mi>10</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>out_of_range</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// output exception information</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"message: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"exception id: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>id</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>endl</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>message: [json.exception.out_of_range.401] array index 4 is out of range |
| exception id: 401 |
| </code></pre></div> </details> <h3 id=jsonexceptionout_of_range401>json.exception.out_of_range.401<a class=headerlink href=#jsonexceptionout_of_range401 title="Permanent link">¶</a></h3> <p>The provided array index <code>i</code> is larger than <code>size-1</code>.</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_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 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.</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 JSON 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 JSON Pointer could not be resolved.</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 JSON Patch operations 'remove' and 'add' can not be applied to the root element of the JSON 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_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 as without changing it to NaN or INF.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>number overflow parsing '10E1000' |
| </code></pre></div> </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>UBJSON and BSON only support integer numbers up to 9223372036854775807.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>number overflow serializing '9223372036854775808' |
| </code></pre></div> </div> <div class="admonition note"> <p class=admonition-title>Note</p> <p>Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision UBJSON numbers, and this exception does not further occur. </p> </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 (following <code>#</code>) of an UBJSON array or object exceeds the maximal capacity.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>excessive array size: 8658170730974374167 |
| </code></pre></div> </div> <h3 id=jsonexceptionout_of_range409>json.exception.out_of_range.409<a class=headerlink href=#jsonexceptionout_of_range409 title="Permanent link">¶</a></h3> <p>Key identifiers to be serialized to BSON cannot contain code point U+0000, since the key is stored as zero-terminated c-string.</p> <div class="admonition failure"> <p class=admonition-title>Example message</p> <div class=highlight><pre><span></span><code>BSON key cannot contain code point U+0000 (at byte 2) |
| </code></pre></div> </div> <h2 id=further-exceptions>Further exceptions<a class=headerlink href=#further-exceptions title="Permanent link">¶</a></h2> <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> <details class=example> <summary>Example</summary> <p>The following code shows how an <code>other_error</code> exception can be caught.</p> <div class=highlight><pre><span></span><code><span class=cp>#include</span><span class=w> </span><span class=cpf><iostream></span> |
| <span class=cp>#include</span><span class=w> </span><span class=cpf><nlohmann/json.hpp></span> |
| |
| <span class=k>using</span><span class=w> </span><span class=n>json</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=n>nlohmann</span><span class=o>::</span><span class=n>json</span><span class=p>;</span> |
| <span class=k>using</span><span class=w> </span><span class=k>namespace</span><span class=w> </span><span class=nn>nlohmann</span><span class=o>::</span><span class=nn>literals</span><span class=p>;</span> |
| |
| <span class=kt>int</span><span class=w> </span><span class=nf>main</span><span class=p>()</span> |
| <span class=p>{</span> |
| <span class=w> </span><span class=k>try</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// executing a failing JSON Patch operation</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>value</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=sa>R</span><span class=s>"</span><span class=dl>(</span><span class=s>{</span> |
| <span class=s> "best_biscuit": {</span> |
| <span class=s> "name": "Oreo"</span> |
| <span class=s> }</span> |
| <span class=s> }</span><span class=dl>)</span><span class=s>"</span><span class=n>_json</span><span class=p>;</span> |
| <span class=w> </span><span class=n>json</span><span class=w> </span><span class=n>patch</span><span class=w> </span><span class=o>=</span><span class=w> </span><span class=sa>R</span><span class=s>"</span><span class=dl>(</span><span class=s>[{</span> |
| <span class=s> "op": "test",</span> |
| <span class=s> "path": "/best_biscuit/name",</span> |
| <span class=s> "value": "Choco Leibniz"</span> |
| <span class=s> }]</span><span class=dl>)</span><span class=s>"</span><span class=n>_json</span><span class=p>;</span> |
| <span class=w> </span><span class=n>value</span><span class=p>.</span><span class=n>patch</span><span class=p>(</span><span class=n>patch</span><span class=p>);</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=w> </span><span class=k>catch</span><span class=w> </span><span class=p>(</span><span class=k>const</span><span class=w> </span><span class=n>json</span><span class=o>::</span><span class=n>other_error</span><span class=o>&</span><span class=w> </span><span class=n>e</span><span class=p>)</span> |
| <span class=w> </span><span class=p>{</span> |
| <span class=w> </span><span class=c1>// output exception information</span> |
| <span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>cout</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"message: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>what</span><span class=p>()</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=sc>'\n'</span> |
| <span class=w> </span><span class=o><<</span><span class=w> </span><span class=s>"exception id: "</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>e</span><span class=p>.</span><span class=n>id</span><span class=w> </span><span class=o><<</span><span class=w> </span><span class=n>std</span><span class=o>::</span><span class=n>endl</span><span class=p>;</span> |
| <span class=w> </span><span class=p>}</span> |
| <span class=p>}</span> |
| </code></pre></div> <p>Output:</p> <div class=highlight><pre><span></span><code>message: [json.exception.other_error.501] unsuccessful: {"op":"test","path":"/best_biscuit/name","value":"Choco Leibniz"} |
| 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 JSON 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> <hr> <div class=md-source-file> <small> Last update: <span class="git-revision-date-localized-plugin git-revision-date-localized-plugin-date">October 31, 2023</span> </small> </div> </article> </div> <script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var tab,labels=set.querySelector(".tabbed-labels");for(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> </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 8v12Z"/></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 - 2023 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 496 512"><!-- Font Awesome Free 6.4.2 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 2023 Fonticons, Inc.--><path d="M165.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.6zm-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.3zm44.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.9zM244.8 8C106.1 8 0 113.3 0 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.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.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-1zm-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.7zm32.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-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"/></svg> </a> <a href=https://twitter.com/nlohmann target=_blank rel=noopener title=twitter.com class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 512 512"><!-- Font Awesome Free 6.4.2 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 2023 Fonticons, Inc.--><path d="M459.37 151.716c.325 4.548.325 9.097.325 13.645 0 138.72-105.583 298.558-298.558 298.558-59.452 0-114.68-17.219-161.137-47.106 8.447.974 16.568 1.299 25.34 1.299 49.055 0 94.213-16.568 130.274-44.832-46.132-.975-84.792-31.188-98.112-72.772 6.498.974 12.995 1.624 19.818 1.624 9.421 0 18.843-1.3 27.614-3.573-48.081-9.747-84.143-51.98-84.143-102.985v-1.299c13.969 7.797 30.214 12.67 47.431 13.319-28.264-18.843-46.781-51.005-46.781-87.391 0-19.492 5.197-37.36 14.294-52.954 51.655 63.675 129.3 105.258 216.365 109.807-1.624-7.797-2.599-15.918-2.599-24.04 0-57.828 46.782-104.934 104.934-104.934 30.213 0 57.502 12.67 76.67 33.137 23.715-4.548 46.456-13.32 66.599-25.34-7.798 24.366-24.366 44.833-46.132 57.827 21.117-2.273 41.584-8.122 60.426-16.243-14.292 20.791-32.161 39.308-52.628 54.253z"/></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 6.4.2 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 2023 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.3zM135.4 416H69V202.2h66.5V416zm-33.2-243c-21.3 0-38.5-17.3-38.5-38.5S80.9 96 102.2 96c21.2 0 38.5 17.3 38.5 38.5 0 21.3-17.2 38.5-38.5 38.5zm282.1 243h-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.9V416z"/></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 6.4.2 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 2023 Fonticons, Inc.--><path d="M162.7 210c-1.8 3.3-25.2 44.4-70.1 123.5-4.9 8.3-10.8 12.5-17.7 12.5H9.8c-7.7 0-12.1-7.5-8.5-14.4l69-121.3c.2 0 .2-.1 0-.3l-43.9-75.6c-4.3-7.8.3-14.1 8.5-14.1H100c7.3 0 13.3 4.1 18 12.2l44.7 77.5zM382.6 46.1l-144 253v.3L330.2 466c3.9 7.1.2 14.1-8.5 14.1h-65.2c-7.6 0-13.6-4-18-12.2l-92.4-168.5c3.3-5.8 51.5-90.8 144.8-255.2 4.6-8.1 10.4-12.2 17.5-12.2h65.7c8 0 12.3 6.7 8.5 14.1z"/></svg> </a> <a href=https://www.paypal.me/nlohmann target=_blank rel=noopener title=www.paypal.me class=md-social__link> <svg xmlns=http://www.w3.org/2000/svg viewbox="0 0 384 512"><!-- Font Awesome Free 6.4.2 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 2023 Fonticons, Inc.--><path d="M111.4 295.9c-3.5 19.2-17.4 108.7-21.5 134-.3 1.8-1 2.5-3 2.5H12.3c-7.6 0-13.1-6.6-12.1-13.9L58.8 46.6c1.5-9.6 10.1-16.9 20-16.9 152.3 0 165.1-3.7 204 11.4 60.1 23.3 65.6 79.5 44 140.3-21.5 62.6-72.5 89.5-140.1 90.3-43.4.7-69.5-7-75.3 24.2zM357.1 152c-1.8-1.3-2.5-1.8-3 1.3-2 11.4-5.1 22.5-8.8 33.6-39.9 113.8-150.5 103.9-204.5 103.9-6.1 0-10.1 3.3-10.9 9.4-22.6 140.4-27.1 169.7-27.1 169.7-1 7.1 3.5 12.9 10.6 12.9h63.5c8.6 0 15.7-6.3 17.4-14.9.7-5.4-1.1 6.1 14.4-91.3 4.6-22 14.3-19.7 29.3-19.7 71 0 126.4-28.8 142.9-112.3 6.5-34.8 4.6-71.4-23.8-92.6z"/></svg> </a> </div> </div> </div> </footer> </div> <div class=md-dialog data-md-component=dialog> <div class="md-dialog__inner md-typeset"></div> </div> <script id=__config type=application/json>{"base": "../..", "features": ["navigation.instant", "navigation.tracking", "navigation.tabs", "navigation.indexes", "navigation.top", "content.tabs.link"], "search": "../../assets/javascripts/workers/search.f886a092.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}}</script> <script src=../../assets/javascripts/bundle.aecac24b.min.js></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-MML-AM_CHTML"></script> </body> </html> |