2017-02-23 1 views
-4

私はjson文字列を持っています。私はオンラインjson形式を使用してエラーを表示してください "エラー:1行目の解析エラー: {nodes:{Creation ----^ 「STRING」、「}」、「未定義」しまった 私のJSON期待:二重引用符と文字列値で書かれた」JSONで正しいjson形式を書くには

{ 
    nodes: { 
     Creation: { 
      color: 'red', 
      shape: 'dot', 
      x: 0.4, 
      y: 0, 
      fixed: true, 
      alpha: 1 
     }, 
     Send_To_Modification: { 
      color: CLR.branch, 
      shape: 'dot', 
      x: 0.4, 
      y: 0, 
      fixed: true, 
      alpha: 1 
     }, 
     Send_To_Verification: { 
      color: CLR.branch, 
      shape: 'dot', 
      x: 0.4, 
      y: 0, 
      fixed: true, 
      alpha: 1 
     }, 
     IBAN checking: { 
      color: CLR.branch, 
      shape: 'dot', 
      x: 0.4, 
      y: 0, 
      fixed: true, 
      alpha: 1 
     }, 
     Send_To_Kassip(KWD SAA Down): { 
      color: CLR.branch, 
      shape: 'dot', 
      x: 0.4, 
      y: 0, 
      fixed: true, 
      alpha: 1 
     } 
    }, 
    edges: { 
     Creation: { 
      Send_To_Modification: { 
       length: 001 
      }, 
      Send_To_Verification: { 
       length: 001 
      }, 
      IBAN checking: { 
       length: 001 
      }, 
      Send_To_Kassip(KWD SAA Down): { 
       length: 001 
      } 
     } 
    } 
}` 
+2

これはJSONではなくJSオブジェクトです。 – evolutionxbox

+0

ここで質問する代わりに、あなたの答えを得るためにJSONフォーマッタをオンラインで使用できました。 –

+0

サイトhttp://json.orgはもう最新ではありませんが、jsonオブジェクトの作成に役立ちます。 – reporter

答えて

1

を、キーがなければなりません文字列は、二重引用符で書かなければなりません。

{ 
"nodes": { 
    "Creation": { 
     "color": "red", 
     "shape": "dot", 
     "x": 0.4, 
     "y": 0, 
     "fixed": true, 
     "alpha": 1 
    }, 
    "Send_To_Modification": { 
     "color": "CLR.branch", 
     "shape": "dot", 
     "x": 0.4, 
     "y": 0, 
     "fixed": true, 
     "alpha": 1 
    }, 
    "Send_To_Verification": { 
     "color": "CLR.branch", 
     "shape": "dot", 
     "x": 0.4, 
     "y": 0, 
     "fixed": true, 
     "alpha": 1 
    }, 
    "IBAN checking": { 
     "color": "CLR.branch", 
     "shape": "dot", 
     "x": 0.4, 
     "y": 0, 
     "fixed": true, 
     "alpha": 1 
    }, 
    "Send_To_Kassip(KWD SAA Down)": { 
     "color": "CLR.branch", 
     "shape": "dot", 
     "x": 0.4, 
     "y": 0, 
     "fixed": true, 
     "alpha": 1 
    } 
}, 
"edges": { 
    "Creation": { 
     "Send_To_Modification": { 
      "length": "001" 
     }, 
     "Send_To_Verification": { 
      "length": "001" 
     }, 
     "IBAN checking": { 
      "length": "001" 
     }, 
     "Send_To_Kassip(KWD SAA Down)": { 
      "length": "001" 
     } 
     } 
    } 
} 
関連する問題