]> Cypherpunks repositories - gostls13.git/commit
encoding/json/v2: fix wrong type with cyclic marshal error in map[string]any
authorJoe Tsai <joetsai@digital-static.net>
Tue, 12 Aug 2025 08:45:44 +0000 (01:45 -0700)
committerJoseph Tsai <joetsai@digital-static.net>
Wed, 13 Aug 2025 22:47:11 +0000 (15:47 -0700)
commit0a75e5a07b858cbe6216c99fa12d582d063499d9
tree80b8f02ac4bc03a46af2ae6c44c0daedfcc54cd9
parentde9b6f98759f718fb48ecef22c2275ac98f1871d
encoding/json/v2: fix wrong type with cyclic marshal error in map[string]any

The type reported in a ErrCycle is the wrong type due to a typo.
This discrepency was detected by setting optimizeCommon to false
and running the tests.

This only modifies code that is compiled in under goexperiment.jsonv2.

Change-Id: I68268f5c719d8b79a67424a35ed0647adf12288c
Reviewed-on: https://go-review.googlesource.com/c/go/+/695277
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Damien Neil <dneil@google.com>
src/encoding/json/v2/arshal_any.go
src/encoding/json/v2/arshal_test.go