]> Cypherpunks repositories - gostls13.git/commitdiff
doc/go1.15: document two noteworthy json changes
authorDaniel Martí <mvdan@mvdan.cc>
Sat, 6 Jun 2020 12:39:11 +0000 (13:39 +0100)
committerDaniel Martí <mvdan@mvdan.cc>
Mon, 8 Jun 2020 12:11:01 +0000 (12:11 +0000)
I had a look at the changes between 1.14 and master, and these are the
only two that seem relevant enough for the changelog.

There was also CL 179337 to reuse values when decoding map elements, but
it got reverted in CL 234559 and is not being included in 1.15.

Updates #37419.

Change-Id: Ib125415a953471ce29553a413d85aaf4b18a7a12
Reviewed-on: https://go-review.googlesource.com/c/go/+/236523
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
doc/go1.15.html

index 34ce3e58ceeffc6e23e67c753dde1d2cd90e5121..73dbf89c2d23329a8009affe9906c1d3bbb80318 100644 (file)
@@ -417,6 +417,21 @@ TODO
   </dd>
 </dl><!-- crypto/x509 -->
 
+<dl id="encoding/json"><dt><a href="/pkg/encoding/json/">encoding/json</a></dt>
+  <dd>
+    <p><!-- CL 191783 -->
+      Decoding a JSON array into a slice no longer reuses any existing slice elements,
+      following the rules that the package documentation already stated.
+    </p>
+
+    <p><!-- CL 199837 -->
+      Introduce an internal limit to the maximum depth of nesting when decoding.
+      This reduces the possibility that a deeply nested input could use large quantities
+      of stack memory, or even cause a "goroutine stack exceeds limit" panic.
+    </p>
+  </dd>
+</dl><!-- encoding/json -->
+
 <dl id="encoding/xml"><dt><a href="/pkg/encoding/xml/">encoding/xml</a></dt>
   <dd>
     <p><!-- CL 203417 -->