Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeLength ¶
func ComputeLength(s *Scanner)
ComputeLength switch scanner in length computing mode. Scanner in this mode shouldn't be used for parsing.
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
Scanner represents a scanner is a JSchema scanning state machine. Callers call scan.reset() and then pass bytes in one at a time by calling scan.step(&scan, c) for each byte. The return value, referred to as an opcode, tells the caller about significant parsing events like beginning and ending literals, objects, and arrays, so that the caller can follow along if it wishes. The return value scanEnd indicates that a single top-level JSON value has been completed, *before* the byte that just got passed in. (The indication must be delayed in order to recognize the end of numbers: is 123 a whole value or the beginning of 12345e+6?).