Skip to main content

json_unicode_mixed_case

Function json_unicode_mixed_case 

Source
pub fn json_unicode_mixed_case(payload: &str) -> String
Expand description

Mixed-case JSON \uXXXX escape — alternates \u and \U plus upper/lowercase hex digits. Some WAF regexes are case-sensitive against \u[0-9A-F]{4}; JSON parsers RFC 8259 only accept \u lowercase, but JavaScript JSON.parse and PHP json_decode tolerate both — pick the form the backend tolerates and the WAF’s regex misses.

Output alternates per-char between four forms: s \U0053 s \U0073.