Programming notes from someone who has been doing this a long time.

Swift, Metal, visionOS, and on-device AI on Apple silicon. Each note is a problem I hit, what didn't work, and the fix, written for the next person who searches for it.

  1. 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.

    foundationjsonobjective-cswiftunicodellm