</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><h3id=bug-fixes_6><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=:bug:> Bug Fixes<aclass=headerlinkhref=#bug-fixes_6title="Permanent link">¶</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 SAX parser for BSON arrays.</li></ul><h3id=improvements_3><imgalt=⚡class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/26a1.svgtitle=:zap:> Improvements<aclass=headerlinkhref=#improvements_3title="Permanent link">¶</a></h3><ul><li>Added support for Clang 5.0.1 (PS4 version). #1341 #1342</li></ul><h3id=further-changes_5><imgalt=🔨class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f528.svgtitle=:hammer:> Further Changes<aclass=headerlinkhref=#further-changes_5title="Permanent link">¶</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 JSON value. Details about this recommendation can be found <ahref=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 MSVC. #1337</li><li>Added code to allow installation via Meson. #1345</li></ul><h3id=deprecated-functions_6><imgalt=🔥class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f525.svgtitle=:fire:> Deprecated functions<aclass=headerlinkhref=#deprecated-functions_6title="Permanent link">¶</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 <ahref=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 <ahref=http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_afe3e137ace692efa08590d8df40f58dd.html#afe3e137ace692efa08590d8df40f58dd><code>items()</code></a> instead.</li><li>Functions <ahref=http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_ab7285a92514fcdbe6de505ebaba92ea3.html#ab7285a92514fcdbe6de505ebaba92ea3><code>friend std::istream& operator<<(basic_json&, std::istream&)</code></a> and <ahref=http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a9e06deabe69262c3ffc5533d32856983.html#a9e06deabe69262c3ffc5533d32856983><code>friend std::ostream& operator>>(const basic_json&, std::ostream&)</code></a> are deprecated. Please use <ahref=http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_aaf363408931d76472ded14017e59c9e8.html#aaf363408931d76472ded14017e59c9e8><code>friend std::istream& operator>>(std::istream&, basic_json&)</code></a> and <ahref=http://nlohmann.github.io/json/doxygen/classnlohmann_1_1basic__json_a5e34c5435e557d0bf666bd7311211405.html#a5e34c5435e557d0bf666bd7311211405><code>friend operator<<(std::ostream&, const basic_json&)</code></a> instead.</li></ul><h2id=v340>v3.4.0<aclass=headerlinkhref=#v340title="Permanent link">¶</a></h2><divclass="admonition summary"><pclass=admonition-title>Files</p><ul><li><ahref=https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip>include.zip</a> (132 KB)</li><li><ahref=https://github.com/nlohmann/json/releases/download/v3.4.0/include.zip.asc>include.zip.asc</a
</code></pre></div><p>If no callback function is used, also the following code works:</p><divclass=highlight><pre><span></span><code><spanclass=n>json</span><spanclass=w></span><spanclass=n>j</span><spanclass=p>;</span>
</code></pre></div><h2id=v211>v2.1.1<aclass=headerlinkhref=#v211title="Permanent link">¶</a></h2><divclass="admonition summary"><pclass=admonition-title>Files</p><ul><li><ahref=https://github.com/nlohmann/json/releases/download/v2.1.1/json.hpp>json.hpp</a> (437 KB)</li><li><ahref=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 SHA-256: faa2321beb1aa7416d035e7417fcfa59692ac3d8c202728f9bcc302e2d558f57</p><h3id=summary_15>Summary<aclass=headerlinkhref=#summary_15title="Permanent link">¶</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><h3id=changes_1>Changes<aclass=headerlinkhref=#changes_1title="Permanent link">¶</a></h3><ul><li><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=: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 JSON input.</li><li><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=: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><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=:bug:> Parsing incorrect JSON numbers with leading 0 (<code>0123</code>) could yield a <ahref=https://github.com/nlohmann/json/issues/452>buffer overflow</a>. This is fixed now by detecting such errors directly by the lexer.</li><li><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=:bug:> Constructing a JSON value from a pointer was incorrectly interpreted as a Boolean; such code will now yield a compiler error.</li><li><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=:bug:> Comparing a JSON number with <code>0</code> led to a comparison with <code>null</code>. This is fixed now.</li><li><imgalt=🐛class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f41b.svgtitle=:bug:> All throw calls are now wrapped in macros.</li><li><imgalt=🔒class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f512.svgtitle=:lock:> Starting during the preparation of this release (since 8 February 2017), commits and released files are <strong>cryptographically signed</strong> with <ahref="https://keybase.io/nlohmann/pgp_keys.asc?fingerprint=797167ae41c0a6d9232e48457f3cea63ae251b69">this GPG key</a>. Previous releases have also been signed.</li><li><imgalt=✨class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/2728.svgtitle=:sparkles:> The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.</li><li><imgalt=🚨class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f6a8.svgtitle=: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><imgalt=🔨class=twemojisrc=https://cdn.jsdelivr.net/gh/jdecked/twemoji@14.1.2/assets/svg/1f528.svgtitle=:hammer:> The code can be compiled easier with many Android NDKs by avoiding macros l