Handle Unicode text, emoji, encoding, normalization, code points, and safe storage.
Lessons
Store Unicode and emoji in JSON correctly.
UTF-8 in JSON is easiest to learn by reading the example, changing it, and observing the result.
const data = { name: 'José', mood: '😀', city: '東京' };
// JSON is UTF-8 and stores emoji/Unicode directly
const text = JSON.stringify(data);
console.log(text); // {"name":"José","mood":"😀","city":"東京"}
// \uXXXX escapes are also valid JSON and round-trip correctly
console.log(JSON.parse('{"mood":"\\uD83D\\uDE00"}').mood); // 😀Practice the UTF-8 in JSON example in a small scratch file, then explain what changed and why.