Reputation: 392
I am trying to read a json file produced by a powershell script which reads another powershell script and outputs an Abstract Syntax Tree of the that script to a json file When I try to read this output json file and parse it as json using nodejs I get the following error (although the json file looks like valid json when i open it in vscode )
undefined:1
��[
^
Unexpected token � in JSON at position 0
Upvotes: -2
Views: 418
Reputation: 151
The error is indicating some unsupported characters at the beginning of your json ��
��[
^
Unexpected ...
That is most likely the reason for this error, as it seems. There could also be other kind of problems like
Upvotes: 0