type Kind … const Invalid … const EOF … const Null … const Bool … const Number … const String … const Name … const ObjectOpen … const ObjectClose … const ArrayOpen … const ArrayClose … const comma … func (k Kind) String() string { … } type Token … // Kind returns the token kind. func (t Token) Kind() Kind { … } // RawString returns the read value in string. func (t Token) RawString() string { … } // Pos returns the token position from the input. func (t Token) Pos() int { … } // Name returns the object name if token is Name, else it panics. func (t Token) Name() string { … } // Bool returns the bool value if token kind is Bool, else it panics. func (t Token) Bool() bool { … } // ParsedString returns the string value for a JSON string token or the read // value in string if token is not a string. func (t Token) ParsedString() string { … } // Float returns the floating-point number if token kind is Number. // // The floating-point precision is specified by the bitSize parameter: 32 for // float32 or 64 for float64. If bitSize=32, the result still has type float64, // but it will be convertible to float32 without changing its value. It will // return false if the number exceeds the floating point limits for given // bitSize. func (t Token) Float(bitSize int) (float64, bool) { … } // Int returns the signed integer number if token is Number. // // The given bitSize specifies the integer type that the result must fit into. // It returns false if the number is not an integer value or if the result // exceeds the limits for given bitSize. func (t Token) Int(bitSize int) (int64, bool) { … } // Uint returns the signed integer number if token is Number. // // The given bitSize specifies the unsigned integer type that the result must // fit into. It returns false if the number is not an unsigned integer value // or if the result exceeds the limits for given bitSize. func (t Token) Uint(bitSize int) (uint64, bool) { … } func (t Token) getIntStr() (string, bool) { … } // TokenEquals returns true if given Tokens are equal, else false. func TokenEquals(x, y Token) bool { … }