4

I am trying to import a data set into parse.com.com and one of the columns has GeoPoints in it. Parse help shows the JSON format ought to be as follows:

{ "__type": "GeoPoint", "latitude": 64.124596, "longitude": -147.86327 }

However, when I try to import it into the data browser, the validation fails since, it appears, the __type is considered a separate column and since the starting characters are invalid, the import fails.

Can someone please help with the correct JSON import format for GeoPoints into Parse?

Rehan
  • 107
  • 1
  • 2
  • 7

1 Answers1

3

Here's how to do it:

{ "results": [
  {
    "name":"Kfar Saba",
    "location": {"__type": "GeoPoint", "latitude": 32.18406, "longitude": 34.91731}
  },
  {
    "name":"Ar'ara BaNegev",
    "location": {"__type": "GeoPoint", "latitude": 32.5, "longitude": 35.1}
  }
}]
Ilya Kogan
  • 21,995
  • 15
  • 85
  • 141