我正在研究freebase API。我有一个 JSON 查询,我试图从 freebase 获取有关城镇中包含的地方的信息。
当我使用来自维基百科的纬度和经度时,我遇到了输入地理位置的问题。当我放置我从中获取的地理位置时,freebase.com
它工作正常,但不适用于所有城镇。我的查询有问题吗?
代码:
query = o("name",name,"type","/location/location","geolocation",a(o("latitude",latitude,
"longitude",longitude)),"contains", a(o("name",null,"id",null,"optional","optional","type","/location/location",
"geolocation",a(o("latitude",null,"longitude",null,"optional","optional")),"limit",800,"count",null)));
错误:java.lang.NullPointerException