Could not parse the JSON file ,Error in Progam.cs asp.net core

后端 未结 11 1064
星月不相逢
星月不相逢 2021-02-07 19:42

I have some issues with the program.cs file, with the version of ASP.NetCORE 2.0

Here\'s my code

     public class Program
{
    public static void Main(st         


        
11条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-07 20:32

    I had the same issue with one of my complex API's, sadly I've wasted few hours to find the issue.

    First of all check whether your appsettings.json is well formatted as a standard JSON.

    My issue was I've mistakenly typed some characters in the appsettings.json file like this, ( for me, 'ttings' characters cause this problem)

    Also check whether all your json files are not empty. A standard json should at least have two curly braces.

提交回复
热议问题