簡體   English   中英

JSON Visual Studio Code 中的文件錯誤:應為逗號 json(514)

[英]JSON file error in Visual Studio Code: Expected comma json(514)

我在使用 Visual Studio Code 時遇到了一個奇怪的問題。 我有以下 JSON 文件有問題:

         {
             "attribute": "// numeroConta",
             "operator": "=",
             "value": 0030152201

         }

這個問題被指責為第二個數字零的“價值”。 問題如下: Expected commajson (514) 我在搜索中什么也沒找到。 任何的想法?

如果你想在數字上有前導 0,你需要制作一個字符串並將它括在“

{
  "attribute": "// numeroConta",
  "operator": "=",
  "value": "0030152201"
}

否則刪除前導 0,前導 0 不直接跟小數點(即 0.2 很好)不會被視為 JSON 格式中的數字,請參閱此處的StackOverflow問題。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM