Javascript “=”登录Json将提供解析器执行选项

Javascript “=”登录Json将提供解析器执行选项,javascript,json,Javascript,Json,我在反序列化JSON时遇到以下异常 分析编号时遇到意外字符:M.路径,第1行,位置1 这是我的密码: var SomeCollections = [ { "id": 50, "title": "A Test (RK)", "cards": [ { "id": 155, "title": "Swimming Turtles",

我在反序列化JSON时遇到以下异常

分析编号时遇到意外字符:M.路径,第1行,位置1

这是我的密码:

var SomeCollections = [
    {
        "id": 50,
        "title": "A Test (RK)",
        "cards": [
            {
                "id": 155,
                "title": "Swimming Turtles",
                "description": "We're swimming, swimming, swimming .......",
                "url": "http://www.youtube.com/watch?v=3MsU1V3X294",
                "alt": "swimming turtles",
                "order": 5,
                "type": "Photo"
            }
        ],
        "templateId": 4,
        "startTime": "09/26/2014 23:42",
        "endTime": "10/06/2015 07:00",
        "status": "live"
    }
]


var value = JSON.stringify(SomeCollections);

        $.ajax({
            type: "POST",
            url: "http://localhost/path/SomeHandler.ashx?method=SomeMethod",
            data: value,
            dataType: "json"            
        });  
代码隐藏 如果我删除url中的“=”符号,这将正常工作


提前感谢。

路径指向:第1行,位置1,因此JSON对象以数组开头这一事实就是您的错误。您有一个使用POST的get url。应该更像:data:{method:'SomeMethod',json:value}。如果可能的话,我会改变您的整个方法,以使获取信息服务器端更容易。@PHPglue:他使用的是.net webrequest处理程序,这些处理程序需要get上的部分和post数据,因为webservice本身包含所有方法,get帮助服务找到正确的方法来运行,然后解析post数据以提供此函数的基本参数。尽管我更希望看到代码背后的完整代码,或者至少是顶级类定义和方法声明,然后才能对这个问题给出更持久的答案:@Icepickle:Yes。这就是为什么在JSON的开头使用var SomeCollections=的原因?这不是Javascript!
string collectionJSON = context.Request.Form[0];
List<CCollection> collections = JsonConvert.DeserializeObject<List<CCollection>>    (collectionJSON, new MyDateTimeConvertor());