Skip to content

Commit 04c6289

Browse files
seankhliaomdempsky
authored andcommitted
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í <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Daniel Martí <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]>
1 parent 2a4f4fc commit 04c6289

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/encoding/json/encode.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import (
4242
// Boolean values encode as JSON booleans.
4343
//
4444
// Floating point, integer, and Number values encode as JSON numbers.
45+
// NaN and +/-Inf values will return an [UnsupportedValueError].
4546
//
4647
// String values encode as JSON strings coerced to valid UTF-8,
4748
// replacing invalid bytes with the Unicode replacement rune.

0 commit comments

Comments
 (0)