MCPcopy Create free account

hub / github.com/buger/jsonparser / functions

Functions1,014 in github.com/buger/jsonparser

FunctionTestRemoval1_Unescape_EscapedQuote
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:789
FunctionTestRemoval1_Unescape_InvalidEscape
============================================================================= ADDITIONAL: Test that the Unescape loop change doesn't affect error hand
dead_code_audit_test.go:770
FunctionTestRemoval1_Unescape_LoopExitsOnSingleEscape
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:39
FunctionTestRemoval1_Unescape_LoopExitsOnTrailingEscape
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:50
FunctionTestRemoval2_GetType_BooleanAtEndOfInput
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:153
FunctionTestRemoval2_GetType_NullAtEndOfInput
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:167
FunctionTestRemoval2_GetType_NumberAtEndOfInput
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:131
FunctionTestRemoval2_Inconsistency_TruncatedNumber
Critical: tokenEnd returns len(data) vs stringEnd/blockEnd returning -1. The inconsistency means getType silently accepts truncated tokens. Verifies:
dead_code_audit_test.go:183
FunctionTestRemoval2_TokenEnd_EmptyInput
============================================================================= REMOVAL 2: `end == -1` guard removed in getType tokenEnd returns len(dat
dead_code_audit_test.go:92
FunctionTestRemoval2_TokenEnd_NeverReturnsNegative
Verifies: SYS-REQ-044 [boundary]
dead_code_audit_test.go:109
FunctionTestRemoval2_TokenEnd_NoDelimiter
Verifies: SYS-REQ-044 [boundary]
dead_code_audit_test.go:100
FunctionTestRemoval3_DecodeSingleUnicodeEscape_MaxValue
============================================================================= REMOVAL 3: `r <= basicMultilingualPlaneOffset` removed in decodeUnicodeE
dead_code_audit_test.go:203
FunctionTestRemoval3_DecodeSingleUnicodeEscape_MinValue
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:219
FunctionTestRemoval3_DecodeUnicodeEscape_BMP_NonSurrogate
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:230
FunctionTestRemoval3_DecodeUnicodeEscape_HighSurrogateAlone
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:242
FunctionTestRemoval3_DecodeUnicodeEscape_ValidSurrogatePair
Verifies: SYS-REQ-014 [boundary]
dead_code_audit_test.go:256
FunctionTestRemoval3_MathematicalProof
Verifies: SYS-REQ-014 [formal]
dead_code_audit_test.go:268
FunctionTestRemoval4_EachKey_NestedObjectWithString
Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:373
FunctionTestRemoval4_EachKey_SkipDeeplyNestedObject
Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:313
FunctionTestRemoval4_EachKey_SkipMultipleNestedObjects
Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:353
FunctionTestRemoval4_EachKey_SkipNestedArray
Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:333
FunctionTestRemoval4_EachKey_SkipNestedObject
============================================================================= REMOVAL 4: `data[i] == '{'` block removed in EachKey Test: unmatched key
dead_code_audit_test.go:288
FunctionTestRemoval4_EachKey_SkipVariousValueTypes
Test with value types that aren't objects — numbers, arrays, strings, bools Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:725
FunctionTestRemoval4_EachKey_TracePath
============================================================================= CRITICAL PATH: Verify EachKey correctly handles the removed block-skip b
dead_code_audit_test.go:676
FunctionTestRemoval5_SearchKeys_ArrayIndex_MalformedNoClose
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:411
FunctionTestRemoval5_SearchKeys_ArrayIndex_NestedObject
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:431
FunctionTestRemoval5_SearchKeys_ArrayIndex_TooShort
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:421
FunctionTestRemoval5_SearchKeys_ArrayIndex_Valid
============================================================================= REMOVAL 5: `keys[level][0] != '['` removed in searchKeys The original co
dead_code_audit_test.go:401
FunctionTestRemoval6_ArrayEach_EmptyStringElement
Verifies: SYS-REQ-006 [boundary]
dead_code_audit_test.go:492
FunctionTestRemoval6_ArrayEach_GetReturnsZeroOffset
============================================================================= REMOVAL 6: `if e != nil` inside `if o == 0` removed in ArrayEach Critica
dead_code_audit_test.go:445
FunctionTestRemoval6_ArrayEach_WhitespaceOnlyInput
Verifies: SYS-REQ-006 [boundary]
dead_code_audit_test.go:516
FunctionTestRemoval7_FindKeyStart_NextTokenGuaranteesNonEmpty
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:553
FunctionTestRemoval7_NextToken_EmptyInput
============================================================================= REMOVAL 7: `ln > 0` guard removed in findKeyStart Verify nextToken retur
dead_code_audit_test.go:537
FunctionTestRemoval7_NextToken_WhitespaceOnly
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:545
FunctionTestRemoval_ObjectEach_MalformedNoClosingBrace
Verifies: SYS-REQ-007 [boundary]
dead_code_audit_test.go:592
FunctionTestRemoval_ObjectEach_MalformedTrailingComma
============================================================================= EXTRA: ObjectEach `for offset < len(data)` → `for {}` Verify the loop ca
dead_code_audit_test.go:578
FunctionTestSet
Verifies: SYS-REQ-009 [example] STK-REQ-005:AC-1:acceptance SYS-REQ-009:malformed_input:nominal Nominal witness for SYS-REQ-009's malformed_input obli
set_spec_test.go:23
FunctionTestSetArrayIndexUnderObjectMalformedJSON_KI3
TestSetArrayIndexUnderObjectMalformedJSON_KI3 is the class witness for the failure mode tracked as KnownIssue KI-3 / DEFECT-260726-MFPA. Historically,
set_spec_test.go:81
FunctionTestSetAutoCoerce_KI3
TestSetAutoCoerce_KI3 locks the auto-coerce semantics that fix KI-3. When a path component expects one container type but the existing structure is th
set_spec_test.go:118
FunctionTestSetBeyondLengthScalarArrayPreservesElements_SYS110
Verifies: SYS-REQ-110 [boundary] SYS-REQ-110:boundary:negative SYS-REQ-110:element_type_partition:nominal Positive/nominal witness for the element_typ
parser_test.go:2500
FunctionTestSetCreatesMissingEntryInExistingArray
Verifies: SYS-REQ-009 [boundary] MCDC SYS-REQ-009: set_creates_missing_path=T, set_path_is_provided=T, set_returns_not_found_error=F, set_returns_upda
set_spec_test.go:38
FunctionTestSetEmptyKeyPathComponent
============================================================================= Set — empty key component produces a defined document, no panic (SYS-REQ
empty_key_path_test.go:179
FunctionTestSetIdempotency
Verifies: SYS-REQ-100 MCDC SYS-REQ-100: set_applied_twice_with_same_args=T, set_second_call_produces_same_result=T => TRUE
obligation_property_test.go:252
FunctionTestSetNestedMutation
Verifies: SYS-REQ-069 [boundary] Set with multi-level path where intermediate levels exist but leaf does not.
deep_spec_test.go:363
FunctionTestSetNoPath
Verifies: SYS-REQ-070 [boundary] Set without any path shall return KeyPathNotFoundError.
deep_spec_test.go:381
FunctionTestSetPathBeyondEOF
Verifies: SYS-REQ-068 [boundary] Set with path pointing beyond EOF shall return error, not panic.
deep_spec_test.go:348
FunctionTestSetSupplementalArrayInsertionCoverage
Verifies: SYS-REQ-009 [boundary] MCDC SYS-REQ-009: N/A
mcdc_supplement_test.go:339
FunctionTestSetTopLevelArrayBeyondLength_KI4
Reproduces: KI-4 TestSetTopLevelArrayBeyondLength_KI4 documents the open design gap (DEFECT-260727-T7P7): Set on a top-level array-index beyond length
parser_test.go:2483
FunctionTestSetTruncatedInput
============================================================================= Set truncation and edge cases (SYS-REQ-051, SYS-REQ-068, SYS-REQ-069, SY
deep_spec_test.go:319
FunctionTestStress_ArrayEach_NestedEmpty
============================================================================= STRESS: Ensure no infinite loops or panics on pathological inputs ======
dead_code_audit_test.go:610
FunctionTestStress_Delete_TokenEndBoundary
Verifies: SYS-REQ-010 [boundary]
dead_code_audit_test.go:642
FunctionTestStress_EachKey_LargeNestedSkip
Verifies: SYS-REQ-008 [boundary]
dead_code_audit_test.go:620
FunctionTestStress_Get_BareTruncatedValue
Verifies: SYS-REQ-001 [boundary]
dead_code_audit_test.go:656
FunctionTestStringEndSentinel
Verifies: SYS-REQ-045 [boundary] stringEnd returns -1 when no closing quote found. Callers must handle.
deep_spec_test.go:137
FunctionTestStringEnd_FastPathEquivalence_Cases
Verifies: SYS-REQ-045
optimization_equiv_test.go:53
FunctionTestStringEnd_FastPathEquivalence_Random
Verifies: SYS-REQ-045
optimization_equiv_test.go:82
FunctionTestStringEnd_FastPath_LongInputs
Directly exercise the fast-path branches with long inputs that would be expensive under per-byte scanning. Verifies: SYS-REQ-045
optimization_equiv_test.go:111
FunctionTestTokenEndSentinel
============================================================================= Sentinel-value tests (SYS-REQ-044, SYS-REQ-045, SYS-REQ-046) ===========
deep_spec_test.go:112
FunctionTestTokenStart
Verifies: STK-REQ-001 [boundary] MCDC STK-REQ-001: N/A
parser_test.go:2293
FunctionTestTraversalDeepNesting
Verifies: SYS-REQ-099 MCDC SYS-REQ-099: traversal_input_is_deeply_nested=T, traversal_handles_deep_nesting_safely=T => TRUE
obligation_property_test.go:716
FunctionTestTraversalDeterminism
Verifies: SYS-REQ-097 MCDC SYS-REQ-097: traversal_called_twice_with_same_input=T, traversal_returns_identical_results=T => TRUE
obligation_property_test.go:113
FunctionTestTraversalNilSafety
Verifies: SYS-REQ-098 MCDC SYS-REQ-098: traversal_input_is_nil=T, traversal_returns_safe_result_for_nil=T => TRUE
obligation_property_test.go:339
FunctionTestTruncatedAtValueBoundary
============================================================================= Truncated-input tests (SYS-REQ-041, SYS-REQ-042, SYS-REQ-043) ==========
deep_spec_test.go:16
FunctionTestTruncatedEscapeSequences
Verifies: SYS-REQ-060 [malformed] Truncated escape sequences in ParseString shall return MalformedValueError.
deep_spec_test.go:598
FunctionTestTruncatedMidKey
Verifies: SYS-REQ-043 [malformed] When JSON input is truncated mid-key (e.g. '{"a'), Get shall return a parse-related error and shall not panic.
deep_spec_test.go:78
FunctionTestTruncatedMidStructure
Verifies: SYS-REQ-042 [malformed] When JSON input is truncated mid-structure (e.g. '{"a":[1,2'), Get shall return a parse-related error and shall not
deep_spec_test.go:47
FunctionTestTypedGetEmptyKeyPathComponent
Verifies: SYS-REQ-016 [boundary] Typed Get accessors must propagate KeyPathNotFoundError for an empty key component instead of panicking on the underl
empty_key_path_test.go:82
FunctionTestTypedGetterDeterminism
Verifies: SYS-REQ-094 MCDC SYS-REQ-094: typed_getter_called_twice_with_same_input=T, typed_getter_returns_identical_results=T => TRUE
obligation_property_test.go:86
FunctionTestTypedGetterEdgeErrors
Verifies: SYS-REQ-003 [boundary] MCDC SYS-REQ-003: N/A Verifies: SYS-REQ-004 [boundary] MCDC SYS-REQ-004: N/A Verifies: SYS-REQ-005 [boundary] MCDC SY
mcdc_supplement_test.go:98
FunctionTestTypedGetterNilSafety
Verifies: SYS-REQ-095 MCDC SYS-REQ-095: typed_getter_input_is_nil=T, typed_getter_returns_safe_result_for_nil=T => TRUE
obligation_property_test.go:314
FunctionTestUnescape
Verifies: SYS-REQ-014 [malformed] MCDC SYS-REQ-014: N/A
escape_test.go:172
FunctionTestUnescapeHighSurrogateThenNonSurrogate
Verifies: SYS-REQ-014 [boundary] — high surrogate followed by a "\u" escape that is NOT a low surrogate (here a BMP codepoint U+0041 'A') → U+FFFD + '
escape_test.go:269
FunctionTestUnescapeLoneHighSurrogate
Verifies: SYS-REQ-014 [boundary] — lone high surrogate → U+FFFD, no following bytes consumed.
escape_test.go:234
FunctionTestUnescapeLoneHighSurrogateFollowedByNonEscape
Verifies: SYS-REQ-014 [boundary] — the bug: high surrogate followed by non-escape bytes was synthesizing U+DC271; must be U+FFFD + literal "A7FA".
escape_test.go:246
FunctionTestUnescapeLoneLowSurrogate
Verifies: SYS-REQ-014 [boundary] — lone low surrogate → U+FFFD.
escape_test.go:257
FunctionTestUnescapeValidSurrogatePairStillWorks
Verifies: SYS-REQ-014 [happy-path] — a valid UTF-16 surrogate pair must still combine into the supplementary-plane code point (regression guard).
escape_test.go:281
FunctionTestValueTypeString
Verifies: STK-REQ-001 [boundary] MCDC STK-REQ-001: N/A
parser_test.go:2268
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:100
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:183
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:237
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:371
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:463
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:509
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:555
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:630
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:676
MethodUnmarshalEasyJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_easyjson.go:786
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:55
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:248
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:469
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:710
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:951
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:1236
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:1506
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:1790
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:2025
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:2332
MethodUnmarshalJSON
Benchmark harness support for STK-REQ-004.
benchmark/benchmark_ffjson.go:2690
FunctionbyteflipAtStructuralByte
byteflipAtStructuralByte flips a byte at a structural position ({, }, [, ], :, ,, "). This corrupts the document skeleton, exercising the parser's mal
json_fuzz_test.go:764
FunctionbytesToString
A hack until issue golang/go#2632 is fixed. See: https://github.com/golang/go/issues/2632
bytes_unsafe.go:32
← previousnext →901–1,000 of 1,014, ranked by callers