次のjsonオブジェクトがあります。
cNGJSON = {
"one": graph1.graphNode, "two": graph2.graphNode, "three": graph3.graphNode, "four": graph4.graphNode, "five": graph5.graphNode,"six": graph6.graphNode,
"seven": graph7.graphNode,"eight": graph8.graphNode, "nine": graph9.graphNode,"ten": graph10.graphNode, "eleven": graph11.graphNode, "twelve": graph12.graphNode,
"thirteen": graph13.graphNode,"fourteen": graph14.graphNode,"fifteen": graph15.graphNode,"sixteen": graph16.graphNode, "seventeen": graph17.graphNode, "eighteen": graph18.graphNode,
"nineteen": graph19.graphNode
};
ここで、graph1.graphNode は整数配列です。
[1,2,3,4]
これをjQueryでサーバーに送信します。
$.ajax({
url: 'validate',
type: 'post',
dataType: 'json',
success: function (data) {
console.log("Success!!");
},
data: cNGJSON
});
しかし、私は
Expected BEGIN_OBJECT but was STRING at line 1 column 1
何度やってもエラー。
cNGJSON を次のように設定してみました。
cNGJSON = {
"one": "Number one", "two": "Number two"
};
それでも同じエラーが発生します。