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

Function isJSONWhitespace

parser.go:74–76  ·  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

72// set mirrors tokenEnd's whitespace classification above.
73// SYS-REQ-010, SYS-REQ-034, SYS-REQ-035
74func isJSONWhitespace(b byte) bool {
75 return b == ' ' || b == '\t' || b == '\n' || b == '\r'
76}
77
78// SYS-REQ-001
79// 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