pub fn json_string_eq(value: &[u8], literal: &[u8]) -> boolExpand description
Compare a JSON-encoded value byte-slice against a plain literal.
- If
valueis a JSON string ("…"), compares the unquoted body. - Otherwise compares the raw bytes (number / bool / null).
Fast path uses memchr::memchr (SIMD-accelerated) to detect escape
sequences and short-circuit the comparison. When the body contains
no \ byte, we fall through to a direct slice equality which LLVM
auto-vectorises to AVX2/SSE on x86_64.