JSON error at the first character? Check for a UTF-8 BOM
If valid-looking JSON fails at the first character, an invisible UTF-8 BOM may be present. See what Prettier changed and how the JSON formatter behaves.
What changed in Prettier 3.10?
Prettier 3.10, released on November 11, can read a .prettierrc.json configuration file that begins with an invisible UTF-8 byte order mark (BOM). This change concerns Prettier configuration files; other JSON tools may still reject the same input.
What happens in our JSON formatter?
The formatter accepts {"ready":true}. The same input is rejected if a BOM (U+FEFF) is still present at the start. The two inputs can look identical on screen.
What to do if parsing fails at the start
Keep the original. Save a copy as UTF-8 without BOM in your editor, then paste it into the formatter again. The JSON standard says not to add a BOM when sending JSON over a network.