From 4506796a6ebee9799dd6272c0fb12c7b993631e2 Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Sat, 21 Jun 2025 10:51:08 -0700 Subject: encoding/json/jsontext: consistently use JSON terminology RFC 8259, section 2 uses the term "begin-array" amd "begin-object" rather than "start array" or "start object". Be consistent in our documentation. Change-Id: I172eb354c5e64b84c74bd662b1e581424e719a32 Reviewed-on: https://go-review.googlesource.com/c/go/+/683155 Auto-Submit: Joseph Tsai Reviewed-by: Damien Neil Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Johan Brandhorst-Satzkorn --- src/encoding/json/jsontext/encode.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/encoding/json/jsontext/encode.go') diff --git a/src/encoding/json/jsontext/encode.go b/src/encoding/json/jsontext/encode.go index a1e6307adc..4853a11059 100644 --- a/src/encoding/json/jsontext/encode.go +++ b/src/encoding/json/jsontext/encode.go @@ -713,7 +713,7 @@ func (e *encoderState) reformatValue(dst []byte, src Value, depth int) ([]byte, // appends it to the end of src, reformatting whitespace and strings as needed. // It returns the extended dst buffer and the number of consumed input bytes. func (e *encoderState) reformatObject(dst []byte, src Value, depth int) ([]byte, int, error) { - // Append object start. + // Append object begin. if len(src) == 0 || src[0] != '{' { panic("BUG: reformatObject must be called with a buffer that starts with '{'") } else if depth == maxNestingDepth+1 { @@ -824,7 +824,7 @@ func (e *encoderState) reformatObject(dst []byte, src Value, depth int) ([]byte, // appends it to the end of dst, reformatting whitespace and strings as needed. // It returns the extended dst buffer and the number of consumed input bytes. func (e *encoderState) reformatArray(dst []byte, src Value, depth int) ([]byte, int, error) { - // Append array start. + // Append array begin. if len(src) == 0 || src[0] != '[' { panic("BUG: reformatArray must be called with a buffer that starts with '['") } else if depth == maxNestingDepth+1 { -- cgit v1.3