This commit is contained in:
2026-02-19 10:07:43 +00:00
parent 007438e372
commit 6e637ecf77
1763 changed files with 60820 additions and 279516 deletions

View File

@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build !goexperiment.jsonv2 || !go1.25
package jsontext
import (
@@ -31,8 +33,8 @@ var errInvalidToken = errors.New("invalid jsontext.Token")
// - a JSON literal (i.e., null, true, or false)
// - a JSON string (e.g., "hello, world!")
// - a JSON number (e.g., 123.456)
// - a start or end delimiter for a JSON object (i.e., { or } )
// - a start or end delimiter for a JSON array (i.e., [ or ] )
// - a begin or end delimiter for a JSON object (i.e., { or } )
// - a begin or end delimiter for a JSON array (i.e., [ or ] )
//
// A Token cannot represent entire array or object values, while a [Value] can.
// There is no Token to represent commas and colons since
@@ -479,9 +481,9 @@ func (t Token) Kind() Kind {
// - 't': true
// - '"': string
// - '0': number
// - '{': object start
// - '{': object begin
// - '}': object end
// - '[': array start
// - '[': array begin
// - ']': array end
//
// An invalid kind is usually represented using 0,