Fix: SyntaxError: Unexpected token < in JSON at position 0
How to fix 'Unexpected token in JSON at position 0', 'JSON.parse: unexpected character', and 'Unexpected end of JSON input' in JavaScript and TypeScript. Covers API returning HTML instead of JSON, Content-Type mismatches, fetch URL typos, invalid JSON syntax, BOM characters, CORS proxies, and debugging with response.text().