MCPcopy Create free account
hub / github.com/buger/jsonparser / isJSONWhitespace

Function isJSONWhitespace

parser.go:72–74  ·  view source on GitHub ↗

isJSONWhitespace reports whether b is one of the four JSON whitespace bytes (space 0x20, tab 0x09, LF 0x0A, CR 0x0D) per RFC 8259 §2. Used by Delete's trailing-comma cleanup to decide whether the byte at endOffset+tokEnd is whitespace preceding a comma, so the cleanup advances past both. The byte se

(b byte)

Source from the content-addressed store, hash-verified

70// set mirrors tokenEnd's whitespace classification above.
71// SYS-REQ-010, SYS-REQ-034, SYS-REQ-035
72func isJSONWhitespace(b byte) bool {
73 return b == ' ' || b == '\t' || b == '\n' || b == '\r'
74}
75
76// SYS-REQ-001
77// NOTE: findTokenStart's two-conditional-return body shape exposes

Callers 1

DeleteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected