开发者

Jquery - Invalid label error

开发者 https://www.devze.com 2023-01-20 11:33 出处:网络
i get the error invalid label {\"ok\" : 1, \"msg\" : \"Uh, we had a sligh...ne here now, thank you. How are you?\"}

i get the error

invalid label
 {"ok" : 1, "msg" : "Uh, we had a sligh...ne here now, thank you. How are you?"}

my js code

   $.aj开发者_高级运维ax({
        url:"http://my.doomain.com:27080/_hello",
        success:function(data)
        {
          alert('Load was performed. '+data+'');
        },
        dataType:'jsonp',
        error:function()
        {
            alert('error');
        }
    });

Hope someone can help me.

Thanks in advance! Peter

PS: I use the rest api from mongo.db (sleepy mongoose)


Try wrapping the JSON string in parenthesis as suggested here: Solving the Invalid Label Error with JSON

0

精彩评论

暂无评论...
验证码 换一张
取 消