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

Function isJSONWhitespace

parser.go:73–75  ·  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

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

Callers 3

isReaderValueDelimiterFunction · 0.85
skipWhitespaceMethod · 0.85
deleteFoundConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected