This commit is contained in:
nlohmann committed 2025-12-19 06:40:15 +00:00
1 parent 094c066118
commit bbee86a3d1
295 files changed
+1010 -1010

No files matched your search

+3 -3
View File
@@ -1,10 +1,10 @@
<!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/releases/" rel="canonical"><link href=../exceptions/ rel=prev><link href=../design_goals/ rel=next><link rel=icon href=../../assets/images/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.7.0"><title>Releases - JSON for Modern C++</title><link rel=stylesheet href=../../assets/stylesheets/main.618322db.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.ab4e12ef.min.css><link rel="stylesheet" href="../../assets/external/fonts.googleapis.com/css.61a430c9.css"><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> <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=#releases 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.54"/></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 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></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> Releases </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_0> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_1 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 12z"/></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_1> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_0 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 12s-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 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <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.52 6.52 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 5"/></svg> </label> <div class=md-search data-md-comLine truncated
<!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/releases/" rel="canonical"><link href=../exceptions/ rel=prev><link href=../design_goals/ rel=next><link rel=icon href=../../assets/images/favicon.png><meta name=generator content="mkdocs-1.6.1, mkdocs-material-9.7.1"><title>Releases - JSON for Modern C++</title><link rel=stylesheet href=../../assets/stylesheets/main.484c7ddc.min.css><link rel=stylesheet href=../../assets/stylesheets/palette.ab4e12ef.min.css><link rel="stylesheet" href="../../assets/external/fonts.googleapis.com/css.61a430c9.css"><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> <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=#releases 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.54"/></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 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></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> Releases </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_0> <label class="md-header__button md-icon" title="Switch to dark mode" for=__palette_1 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 12z"/></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_1> <label class="md-header__button md-icon" title="Switch to light mode" for=__palette_0 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 12s-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 12z"/></svg> </label> </form> <script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script> <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.52 6.52 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 5"/></svg> </label> <div class=md-search data-md-comLine truncated
<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>&lt;&lt;</span><span class=w> </span><span class=n>key</span><span class=w> </span><span class=o>&lt;&lt;</span><span class=w> </span><span class=sc>&#39;:&#39;</span><span class=w> </span><span class=o>&lt;&lt;</span><span class=w> </span><span class=n>val</span><span class=w> </span><span class=o>&lt;&lt;</span><span class=w> </span><span class=sc>&#39;\n&#39;</span><span class=p>;</span>
<span class=p>}</span>
</code></pre></div> #1388 #1391</p> </li> <li> <p>Added support for <strong>reading from <code>FILE*</code></strong> to support situations in which streams are nit available or would require too much RAM. #1370 #1392</p> </li> </ul> <h3 id=bug-fixes_6><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Bug Fixes<a class=headerlink href=#bug-fixes_6 title="Permanent link">&para;</a></h3> <ul> <li>The <code>eofbit</code> was not set for input streams when the end of a stream was reached while parsing. #1340 #1343</li> <li>Fixed a bug in the <abbr title="Simple API for XML">SAX</abbr> parser for <abbr title="Binary JSON">BSON</abbr> arrays.</li> </ul> <h3 id=improvements_3><img alt="⚡" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/26a1.svg" title=":zap:"> Improvements<a class=headerlink href=#improvements_3 title="Permanent link">&para;</a></h3> <ul> <li>Added support for Clang 5.0.1 (PS4 version). #1341 #1342</li> </ul> <h3 id=further-changes_5><img alt="🔨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f528.svg" title=":hammer:"> Further Changes<a class=headerlink href=#further-changes_5 title="Permanent link">&para;</a></h3> <ul> <li>Added a warning for implicit conversions to the documentation: It is not recommended to use implicit conversions when reading <strong>from</strong> a <abbr title="JavaScript Object Notation">JSON</abbr> value. Details about this recommendation can be found <a href="https://www.github.com/nlohmann/json/issues/958">here</a>. #1363</li> <li>Fixed typos in the documentation. #1329 #1380 #1382</li> <li>Fixed a C4800 warning. #1364</li> <li>Fixed a <code>-Wshadow</code> warning #1346</li> <li>Wrapped <code>std::snprintf</code> calls to avoid error in <abbr title="Microsoft Visual C++">MSVC</abbr>. #1337</li> <li>Added code to allow installation via Meson. #1345</li> </ul> <h3 id=deprecated-functions_6><img alt="🔥" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f525.svg" title=":fire:"> Deprecated functions<a class=headerlink href=#deprecated-functions_6 title="Permanent link">&para;</a></h3> <p>This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):</p> <ul> <li>Function <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e"><code>iterator_wrapper</code></a> are deprecated. Please use the member function <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd"><code>items()</code></a> instead.</li> <li>Functions <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3"><code>friend std::istream&amp; operator&lt;&lt;(basic_json&amp;, std::istream&amp;)</code></a> and <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983"><code>friend std::ostream&amp; operator&gt;&gt;(const basic_json&amp;, std::ostream&amp;)</code></a> are deprecated. Please use <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8"><code>friend std::istream&amp; operator&gt;&gt;(std::istream&amp;, basic_json&amp;)</code></a> and <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405"><code>friend operator&lt;&lt;(std::ostream&amp;, const basic_json&amp;)</code></a> instead.</li> </ul> <h2 id=v340>v3.4.0<a class=headerlink href=#v340 title="Permanent link">&para;</a></h2> <div class="admonition summary"> <p class=admonition-title>Files</p> <ul> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip">include.zip</a> (132 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip.asc">include.zip.asc</a> (1 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp">json.hpp</a> (689 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp.asc">json.hpp.asc</a> (1 KB)</li> </ul> </div> <p>Release date: 2018-10-30 <abbr title="Secure Hash Algorithm">SHA</abbr>-256: 63da6d1f22b2a7bb9e4ff7d6b255cf691a161ff49532dcc45d398a53e295835f (json.hpp), bfec46fc0cee01c509cf064d2254517e7fa80d1e7647fea37cf81d97c5682bdc (include.zip)</p> <h3 id=summary_7>Summary<a class=headerlink href=#summary_7 title="Permanent link">&para;</a></h3> <p>This release introduces three new features:<Line truncated
</code></pre></div> #1388 #1391</p> </li> <li> <p>Added support for <strong>reading from <code>FILE*</code></strong> to support situations in which streams are nit available or would require too much RAM. #1370 #1392</p> </li> </ul> <h3 id=bug-fixes_6><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Bug Fixes<a class=headerlink href=#bug-fixes_6 title="Permanent link">&para;</a></h3> <ul> <li>The <code>eofbit</code> was not set for input streams when the end of a stream was reached while parsing. #1340 #1343</li> <li>Fixed a bug in the <abbr title="Simple API for XML">SAX</abbr> parser for <abbr title="Binary JSON">BSON</abbr> arrays.</li> </ul> <h3 id=improvements_3><img alt="⚡" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/26a1.svg" title=":zap:"> Improvements<a class=headerlink href=#improvements_3 title="Permanent link">&para;</a></h3> <ul> <li>Added support for Clang 5.0.1 (PS4 version). #1341 #1342</li> </ul> <h3 id=further-changes_5><img alt="🔨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f528.svg" title=":hammer:"> Further Changes<a class=headerlink href=#further-changes_5 title="Permanent link">&para;</a></h3> <ul> <li>Added a warning for implicit conversions to the documentation: It is not recommended to use implicit conversions when reading <strong>from</strong> a <abbr title="JavaScript Object Notation">JSON</abbr> value. Details about this recommendation can be found <a href="https://www.github.com/nlohmann/json/issues/958">here</a>. #1363</li> <li>Fixed typos in the documentation. #1329 #1380 #1382</li> <li>Fixed a C4800 warning. #1364</li> <li>Fixed a <code>-Wshadow</code> warning #1346</li> <li>Wrapped <code>std::snprintf</code> calls to avoid error in <abbr title="Microsoft Visual C++">MSVC</abbr>. #1337</li> <li>Added code to allow installation via Meson. #1345</li> </ul> <h3 id=deprecated-functions_6><img alt="🔥" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f525.svg" title=":fire:"> Deprecated functions<a class=headerlink href=#deprecated-functions_6 title="Permanent link">&para;</a></h3> <p>This release does not deprecate any functions. As an overview, the following functions have been deprecated in earlier versions and will be removed in the next major version (i.e., 4.0.0):</p> <ul> <li>Function <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_af1592a06bc63811886ade4f9d965045e.html#af1592a06bc63811886ade4f9d965045e"><code>iterator_wrapper</code></a> are deprecated. Please use the member function <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd"><code>items()</code></a> instead.</li> <li>Functions <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3"><code>friend std::istream&amp; operator&lt;&lt;(basic_json&amp;, std::istream&amp;)</code></a> and <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983"><code>friend std::ostream&amp; operator&gt;&gt;(const basic_json&amp;, std::ostream&amp;)</code></a> are deprecated. Please use <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8"><code>friend std::istream&amp; operator&gt;&gt;(std::istream&amp;, basic_json&amp;)</code></a> and <a href="http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405"><code>friend operator&lt;&lt;(std::ostream&amp;, const basic_json&amp;)</code></a> instead.</li> </ul> <h2 id=v340>v3.4.0<a class=headerlink href=#v340 title="Permanent link">&para;</a></h2> <div class="admonition summary"> <p class=admonition-title>Files</p> <ul> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip">include.zip</a> (132 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip.asc">include.zip.asc</a> (1 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp">json.hpp</a> (689 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v3.4.0/json.hpp.asc">json.hpp.asc</a> (1 KB)</li> </ul> </div> <p>Release date: 2018-10-30 <abbr title="Secure Hash Algorithm">SHA</abbr>-256: 63da6d1f22b2a7bb9e4ff7d6b255cf691a161ff49532dcc45d398a53e295835f (json.hpp), bfec46fc0cee01c509cf064d2254517e7fa80d1e7647fea37cf81d97c5682bdc (include.zip)</p> <h3 id=summary_7>Summary<a class=headerlink href=#summary_7 title="Permanent link">&para;</a></h3> <p>This release introduces three new features:<Line truncated
</code></pre></div> <p>New code:</p> <div class=highlight><pre><span></span><code><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=n>json</span><span class=o>::</span><span class=n>parse</span><span class=p>(</span><span class=n>ss</span><span class=p>,</span><span class=w> </span><span class=n>cb</span><span class=p>);</span>
</code></pre></div> <p>If no callback function is used, also the following code works:</p> <div class=highlight><pre><span></span><code><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=p>;</span>
<span class=n>j</span><span class=w> </span><span class=o>&lt;&lt;</span><span class=w> </span><span class=n>ss</span><span class=p>;</span>
</code></pre></div> <p>or</p> <div class=highlight><pre><span></span><code><span class=n>json</span><span class=w> </span><span class=n>j</span><span class=p>;</span>
<span class=n>ss</span><span class=w> </span><span class=o>&gt;&gt;</span><span class=w> </span><span class=n>j</span><span class=p>;</span>
</code></pre></div> <h2 id=v211>v2.1.1<a class=headerlink href=#v211 title="Permanent link">&para;</a></h2> <div class="admonition summary"> <p class=admonition-title>Files</p> <ul> <li><a href="https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp">json.hpp</a> (437 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp.asc">json.hpp.asc</a> (1 KB)</li> </ul> </div> <p>Release date: 2017-02-25 <abbr title="Secure Hash Algorithm">SHA</abbr>-256: faa2321beb1aa7416d035e7417fcfa59692ac3d8c202728f9bcc302e2d558f57</p> <h3 id=summary_15>Summary<a class=headerlink href=#summary_15 title="Permanent link">&para;</a></h3> <p>This release <strong>fixes a locale-related bug in the parser</strong>. To do so, the whole number handling (lexer, parser, and also the serialization) have been overworked. Furthermore, a lot of small changes added up that were added to this release. All changes are backward-compatible.</p> <h3 id=changes_1>Changes<a class=headerlink href=#changes_1 title="Permanent link">&para;</a></h3> <ul> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Locales that have a different character than <code>.</code> as decimal separator (e.g., the Norwegian locale <code>nb_NO.UTF-8</code>) led to truncated number parsing or parse errors. The library now has been fixed to work with <strong>any locale</strong>. Note that <code>.</code> is still the only valid decimal separator for <abbr title="JavaScript Object Notation">JSON</abbr> input.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Numbers like <code>1.0</code> were correctly parsed as floating-point number, but serialized as integer (<code>1</code>). Now, <strong>floating-point numbers correctly round trip</strong>.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Parsing incorrect <abbr title="JavaScript Object Notation">JSON</abbr> numbers with leading 0 (<code>0123</code>) could yield a <a href="https://github.com/nlohmann/json/issues/452">buffer overflow</a>. This is fixed now by detecting such errors directly by the lexer.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Constructing a <abbr title="JavaScript Object Notation">JSON</abbr> value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> Comparing a <abbr title="JavaScript Object Notation">JSON</abbr> number with <code>0</code> led to a comparison with <code>null</code>. This is fixed now.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg" title=":bug:"> All throw calls are now wrapped in macros.</li> <li><img alt="🔒" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f512.svg" title=":lock:"> Starting during the preparation of this release (since 8 February 2017), commits and released files are <strong>cryptographically signed</strong> with <a href="https://keybase.io/nlohmann/pgp_keys.asc?fingerprint=797167ae41c0a6d9232e48457f3cea63ae251b69">this GPG key</a>. Previous releases have also been signed.</li> <li><img alt="✨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/2728.svg" title=":sparkles:"> The parser for MessagePack and <abbr title="Concise Binary Object Representation">CBOR</abbr> now supports an optional start index parameter to define a byte offset for the parser.</li> <li><img alt="🚨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f6a8.svg" title=":rotating_light:"> Some more warnings have been fixed. With Clang, the code compiles <strong>without warnings</strong> with <code>-Weverything</code> (well, it needs <code>-Wno-documentation-unknown-command</code> and <code>-Wno-deprecated-declarations</code>, but you get the point).</li> <li><img alt="🔨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f528.svg" title=":hammer:"> The code can be compiled easier with many Android NDKs by avoiding macros like <code>UINT8_MAX</code> which previously required defining a preprocessor macro for compilation.</li> <li><img alt="⚡" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/26a1.svg" title=":zap:"> The unit tests now compile two times faster.</li> <li><img alt="➕" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdeckedLine truncated
</code></pre></div> <h2 id=v211>v2.1.1<a class=headerlink href=#v211 title="Permanent link">&para;</a></h2> <div class="admonition summary"> <p class=admonition-title>Files</p> <ul> <li><a href="https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp">json.hpp</a> (437 KB)</li> <li><a href="https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp.asc">json.hpp.asc</a> (1 KB)</li> </ul> </div> <p>Release date: 2017-02-25 <abbr title="Secure Hash Algorithm">SHA</abbr>-256: faa2321beb1aa7416d035e7417fcfa59692ac3d8c202728f9bcc302e2d558f57</p> <h3 id=summary_15>Summary<a class=headerlink href=#summary_15 title="Permanent link">&para;</a></h3> <p>This release <strong>fixes a locale-related bug in the parser</strong>. To do so, the whole number handling (lexer, parser, and also the serialization) have been overworked. Furthermore, a lot of small changes added up that were added to this release. All changes are backward-compatible.</p> <h3 id=changes_1>Changes<a class=headerlink href=#changes_1 title="Permanent link">&para;</a></h3> <ul> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Locales that have a different character than <code>.</code> as decimal separator (e.g., the Norwegian locale <code>nb_NO.UTF-8</code>) led to truncated number parsing or parse errors. The library now has been fixed to work with <strong>any locale</strong>. Note that <code>.</code> is still the only valid decimal separator for <abbr title="JavaScript Object Notation">JSON</abbr> input.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Numbers like <code>1.0</code> were correctly parsed as floating-point number, but serialized as integer (<code>1</code>). Now, <strong>floating-point numbers correctly round trip</strong>.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Parsing incorrect <abbr title="JavaScript Object Notation">JSON</abbr> numbers with leading 0 (<code>0123</code>) could yield a <a href="https://github.com/nlohmann/json/issues/452">buffer overflow</a>. This is fixed now by detecting such errors directly by the lexer.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Constructing a <abbr title="JavaScript Object Notation">JSON</abbr> value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> Comparing a <abbr title="JavaScript Object Notation">JSON</abbr> number with <code>0</code> led to a comparison with <code>null</code>. This is fixed now.</li> <li><img alt="🐛" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f41b.svg" title=":bug:"> All throw calls are now wrapped in macros.</li> <li><img alt="🔒" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f512.svg" title=":lock:"> Starting during the preparation of this release (since 8 February 2017), commits and released files are <strong>cryptographically signed</strong> with <a href="https://keybase.io/nlohmann/pgp_keys.asc?fingerprint=797167ae41c0a6d9232e48457f3cea63ae251b69">this GPG key</a>. Previous releases have also been signed.</li> <li><img alt="✨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/2728.svg" title=":sparkles:"> The parser for MessagePack and <abbr title="Concise Binary Object Representation">CBOR</abbr> now supports an optional start index parameter to define a byte offset for the parser.</li> <li><img alt="🚨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f6a8.svg" title=":rotating_light:"> Some more warnings have been fixed. With Clang, the code compiles <strong>without warnings</strong> with <code>-Weverything</code> (well, it needs <code>-Wno-documentation-unknown-command</code> and <code>-Wno-deprecated-declarations</code>, but you get the point).</li> <li><img alt="🔨" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/1f528.svg" title=":hammer:"> The code can be compiled easier with many Android NDKs by avoiding macros like <code>UINT8_MAX</code> which previously required defining a preprocessor macro for compilation.</li> <li><img alt="⚡" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdecked/twemoji@16.0.1/assets/svg/26a1.svg" title=":zap:"> The unit tests now compile two times faster.</li> <li><img alt="➕" class="twemoji" src="../../assets/external/cdn.jsdelivr.net/gh/jdeckedLine truncated