0

I am deploying an Angular project on Ubuntu and am running into This issue ("Unexpected token m in JSON at position 0.")

Someone suggested that I resave my angular.json file as UTF-8. I'm not exactly sure how to do that, do I need to add code or just change a file type?

If anyone knows how to do that (and why that might help) that would be great. Thanks!

David Walschots
  • 12,279
  • 5
  • 36
  • 59
Devstar34
  • 1,027
  • 2
  • 21
  • 47
  • UTF-8 is the file's [encoding](https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/). What text editor are you using? – David Walschots Oct 01 '18 at 18:35
  • @DavidWalschots Hm yeah, I'm using VS Code – Devstar34 Oct 01 '18 at 18:38

1 Answers1

1

To change the encoding of a file within vscode, do the following:

  1. Open the file.
  2. Look in the bottom right corner and press the name of the current encoding. In my example image below it is already UTF-8.
  3. Select "save with encoding".
  4. Pick the encoding you want to save the file with.

enter image description here

David Walschots
  • 12,279
  • 5
  • 36
  • 59