This commit is contained in:
nlohmann committed 2024-12-11 07:32:31 +00:00
1 parent 41cbe4b3ef
commit e3f1e1d35b
229 files changed
+463 -454

No files matched your search

+1 -1
View File
@@ -7,4 +7,4 @@
<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 SHA-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=https://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 JSON input.</li> <li><img alt=🐛 class=twemoji src=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Parsing incorrect JSON 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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Constructing a JSON 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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Comparing a JSON number with <code>0</code> led to a comparison with <code>null</code>. This is fixed now.</li> <li><img alt=🐛 class=twemoji src=https://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=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/2728.svg title=:sparkles:> The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.</li> <li><img alt=🚨 class=twemoji src=https://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=https://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=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/2795.svg title=:heavy_plus_sign:> <a href=https://github.com/sakra/cotire>Cotire</a> is used to speed up the build.</li> <li><img alt=✏ class=twemoji src=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/270f.svg title=:pencil2:> Fixed a lot of typos in the documentation.</li> <li><img alt=📝 class=twemoji src=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f4dd.svg title=:memo:> Added a section to the README file that lists all used <a href=https://github.com/nlohmann/json#used-third-party-tools>Line 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 SHA-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=https://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 JSON input.</li> <li><img alt=🐛 class=twemoji src=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Parsing incorrect JSON 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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Constructing a JSON 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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f41b.svg title=:bug:> Comparing a JSON number with <code>0</code> led to a comparison with <code>null</code>. This is fixed now.</li> <li><img alt=🐛 class=twemoji src=https://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=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/2728.svg title=:sparkles:> The parser for MessagePack and CBOR now supports an optional start index parameter to define a byte offset for the parser.</li> <li><img alt=🚨 class=twemoji src=https://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=https://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=https://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=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/2795.svg title=:heavy_plus_sign:> <a href=https://github.com/sakra/cotire>Cotire</a> is used to speed up the build.</li> <li><img alt=✏ class=twemoji src=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/270f.svg title=:pencil2:> Fixed a lot of typos in the documentation.</li> <li><img alt=📝 class=twemoji src=https://cdn.jsdelivr.net/gh/jdecked/twemoji@15.1.0/assets/svg/1f4dd.svg title=:memo:> Added a section to the README file that lists all used <a href=https://github.com/nlohmann/json#used-third-party-tools>Line truncated