encoding/json: document unsupported float values

Fixes #59627

Change-Id: Icd6a9803e213596de6136ec980b0a352c450e6f7
Reviewed-on: https://go-review.googlesource.com/c/go/+/496142
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
Sean Liao 2023-05-19 19:04:07 +01:00 committed by Matthew Dempsky
parent 2a4f4fc525
commit 04c628935d

View file

@ -42,6 +42,7 @@ import (
// Boolean values encode as JSON booleans.
//
// Floating point, integer, and Number values encode as JSON numbers.
// NaN and +/-Inf values will return an [UnsupportedValueError].
//
// String values encode as JSON strings coerced to valid UTF-8,
// replacing invalid bytes with the Unicode replacement rune.