- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我将 Angular CLI 添加到我的项目中,一切正常。然后我决定单击 Visual Studio 2017 顶部的小旗帜,这表明有 VS 2017 的新更新。我安装了它并重新启动了我的 Windows 10 PC。
现在它可以使用 F6 成功构建,但是当我在浏览器中 F5 或 Ctrl+F5 我的 .net core mvc 应用程序时出现以下错误:
An error occurred while starting the application.
JsonReaderException: Invalid property identifier character: {. Path 'Logging', line 10, position 2. Newtonsoft.Json.JsonTextReader.ParseProperty()
FormatException: Could not parse the JSON file. Error on line number '10': '}, {'. Microsoft.Extensions.Configuration.FileConfigurationProvider.Load(bool reload)
JsonReaderException: Invalid property identifier character: {. Path 'Logging', line 10, position 2. Newtonsoft.Json.JsonTextReader.ParseProperty() Newtonsoft.Json.Linq.JContainer.ReadContentFrom(JsonReader r, JsonLoadSettings settings) Newtonsoft.Json.Linq.JContainer.ReadTokenFrom(JsonReader reader, JsonLoadSettings options) Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings) Microsoft.Extensions.Configuration.Json.JsonConfigurationFileParser.Parse(Stream input) Microsoft.Extensions.Configuration.Json.JsonConfigurationProvider.Load(Stream stream)
我的 appsettings.json 文件如下所示:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Warning"
}
}
}
我想不出任何其他 .json 文件会成为问题。我删除了我添加的 Angular 客户端应用程序文件夹,它仍然产生相同的错误。
我不知道从哪里开始尝试解决这个问题,Google 也没有提出任何其他具有相同问题的帖子。
建议?
最佳答案
@Jamie Taylor 想通了。
我没有看到的一个文件是“appsettings.Development.json”,因为它不会出现在解决方案资源管理器中,除非您展开 appsettings.json。
我有:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
},
{
"AWS": {
"Profile": "Default",
"Region": "us-east-1"
}
}
}
它在同一天早些时候工作,我可以在我的 Windows 文件资源管理器中看到该文件在过去 2 周内没有更改。此 JSON 文件的格式不正确。因为我不再需要 AWS 的东西,所以我删除了那部分,现在它的工作方式是:
{
"Logging": {
"IncludeScopes": false,
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}
关于c# - .net 核心 : Invalid property identifier character: {. 路径 'Logging',第 10 行,位置 2。Newtonsoft.Json.JsonTextReader.ParseProperty(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47804926/
int i; System.out.print("Please enter a string: "); String string_1 = input.nextLine(); System.out
我想要一个正则表达式来检查 a password must be eight characters including one uppercase letter, one special charac
在此先感谢您的帮助。 在命令行输入“example”时,Python 返回“example”。我在网上找不到任何东西来解释这一点。所有引用资料都在 print 命令的上下文中谈到字符串,我得到了所有关
我有 CSV 格式的数据,这些数据在字符编码方面被严重打乱,可能在不同的软件应用程序(LibreOffice Calc、Microsoft、Excel、Google Refine、自定义 PHP/My
我正在为 Latex 使用 Sublime Text,所以我需要使用特定的编码。但是,在某些情况下,当我粘贴从不同程序(大多数情况下为单词/浏览器)复制的文本时,我收到以下消息: "Not all c
在 flutter 中,我使用了一个php文件,该文件从数据库查询返回json响应,但是当我尝试解码json时,出现此错误: E/flutter ( 8294): [ERROR:flutter/lib
我在 Flutter 项目中遇到异常。错误如下所示: Exception has occurred. FormatException (FormatException: Unexpected char
这个问题已经有答案了: Why doesn't my compare work between char and int in Java? (4 个回答) 已关闭 3 年前。 我试图在我的代码中找出
我在 Flutter 项目中遇到异常。错误如下所示: Exception has occurred. FormatException (FormatException: Unexpected char
我是 python 新手,需要一些帮助。我应该编写一个脚本,从键盘读取单词,直到输入单词 999。对于除 999 之外的每个单词,报告该单词是否有效。如果单词的第一个字符等于最后一个字符,则该单词有效
我正在实现自己的词法分析器,并且刚刚了解了 C# 如何处理字 rune 字:https://msdn.microsoft.com/en-us/library/aa691087(v=vs.71).asp
我有这个字符串: var test = "toto@test.com"; 我想用空值替换“@”字符后的所有字符。我想得到这个字符串: var test = "toto" 最佳答案 试试这个: test
我将数据库从 sqlite 更改为 postgresql 以用于我网站的生产,但出现此错误。当我在本地使用 sqlite 时,它没有出现这个错误。使用 Django。 ProgrammingErr
我正在为我的实验表制作凯撒密码,并使其能够加密 3 代入(凯撒密码),这是练习的重点。但是有一件事困扰着我。首先,如果我输入 3 以外的字符,则有一个尾随字符。例如,输入“恶意软件”,然后输入 2 作
遵循 this question 中的逻辑,以下代码应该有效: #include int main(){ printf("%c", '\0101'); return 0; } 然而,
我在处理一段代码时遇到错误: Too many characters in character literal error 使用 C# 和 switch 语句遍历字符串缓冲区并读取标记,但在这一行中出
给定一个元素,其值为: Distrib = SU & Prem <> 0 我要转<或 >进入 <或 >因为下游应用程序需要
从表面上看,他们似乎都在做同样的事情。但似乎是后者as(,"character")更强大。 作为示例,请考虑以下内容: library(rvest) temp % html_node("div p")
我刚开始使用python,所以很可能只是在做一些愚蠢的事情。我正在从表中读取数据,需要将它们放入txt文件的列中。我无法说服我的代码创建新行。 这是我的代码- file = open("test_m.
在尝试刷新我的项目的 Fortran 90 知识时,我在使用内部文件时遇到了一些奇怪的情况。考虑示例代码: ! ---- internal_file_confusion.f90 ---- progra
我是一名优秀的程序员,十分优秀!