Tagged “Unicode”
-
NSJSONSerialization silently deletes U+FEFF from JSON strings
NSJSONSerialization strips U+FEFF (the BOM / zero-width no-break space) from inside JSON strings, so distinct keys merge and tokenizer.json vocabularies load wrong. Swift's JSONDecoder doesn't. Repro, scope, and three fixes.