API talk:Nearby places viewer

About this board

Help on Discourse: this experimental prototype website is closed.

2
Summary by KBach-WMF

Removed link to the archived Discourse instance.

Wladek92 (talkcontribs)

Following sentence "Got questions about this tutorial? Ask here on Discourse" should be corrected due to Discourse no longer available.

Christian 🇫🇷 FR (talk) 20:29, 30 August 2021 (UTC)

KBach-WMF (talkcontribs)

I removed this bullet point entirely, thanks!

json response format problem

2
Nathanb94 (talkcontribs)

Hi,

I have a problem withe the answer of this model of request(

https://en.wikipedia.org/w/api.php?action=query&format=json&prop=coordinates%7Cpageimages%7Cpageterms&colimit=50&piprop=thumbnail&pithumbsize=144&pilimit=50&wbptterms=description&generator=geosearch&ggscoord=37.786952%7C-122.399523&ggsradius=10000&ggslimit=2)

it's return the POIs around a specific location but the json format is not correct:

the Key "pages" is an object but contains list of POIs.

I think that it's must be change to be an array.

nathan

Harry Wood (talkcontribs)

"pages" is an dictionary (also known as a map, hashmap or associative array) in which the keys are arbitrary strings (page ids).

This is a slightly unusual json API design which some people like to avoid (use just an array instead as you suggest) because it can cause headaches for some API tools/description languages, but it's not invalid.

Reply to "json response format problem"
There are no older topics