From 5c6b2b14db8264a8cdc3634e68c7ae65307df0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Sat, 6 Jun 2020 13:39:11 +0100 Subject: [PATCH] doc/go1.15: document two noteworthy json changes 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 --- doc/go1.15.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/doc/go1.15.html b/doc/go1.15.html index 34ce3e58ceeffc..73dbf89c2d2332 100644 --- a/doc/go1.15.html +++ b/doc/go1.15.html @@ -417,6 +417,21 @@

Minor changes to the library

+
encoding/json
+
+

+ Decoding a JSON array into a slice no longer reuses any existing slice elements, + following the rules that the package documentation already stated. +

+ +

+ 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. +

+
+
+
encoding/xml