0

Referring to my question above, the reason I want to retrieve the file is that I want to know how it is structured so I can make the script that I copied work using my data instead.

Currently, the $.getJSON url includes the string "callback=?" in it.

So is there anyway, I can peek through or see how the data is structured in the file thats inside the $.getJSON url string?

actually, Im following along a demo below

https://code.google.com/r/kgraham-flr-map/source/browse/examples/medicare-dynamic-ds.js?spec=svn72fd5de93cf24b0b2baa5d2678d9518741e3d80b&r=72fd5de93cf24b0b2baa5d2678d9518741e3d80b

Tthe script in question has the $.getJSON('https://storelocator-go-demo.appspot.com/query?callback=?' to parse the data.

When I tried opening the url, I get this error strconv.ParseFloat: parsing "": invalid syntax

我想看看 JSON 文件的结构,以便我可以用我自己的数据替换它。

希望这能解决我的问题。

4

1 回答 1

1

从评论:

所以你的意思是我在尝试打开 json 文件时遇到的错误是由于服务器问题引起的?

好吧,它可以给你一个更有用的错误信息。问题是你没有给它它需要的论据。

如果我去:

https://storelocator-go-demo.appspot.com/query?callback=foo

...然后像你​​一样,我得到了那个错误。但是,如果我给它参数(这些是从您提供的示例链接中抄录而来的):

https://storelocator-go-demo.appspot.com/query?callback=foo&lat=-29.292219923932738&lng=137.763512&n=-10.691329506145314&e=167.382652625&s=-47.89311034172016&w=108.14437137499999&audio=&access=&_=1364633286163

我得到一个有效的 JSONP 响应。

于 2013-03-30T08:50:57.973 回答