I have several fields in a json file, and I need to determine which of the json-fields are GeoJSON. For example, here is a sample of the data I have:
{
"name": "bob",
"age": 20,
"info": {"height": 189, "weight": 101}
"location": { "type": "Feature","geometry": {"type": "Point","coordinates": [125.6, 10.1]},"properties": {"name": "Dinagat Islands"}}
}
I would like to get the following column information from this:
- name (string)
- age (int)
- info (json)
- location (geojson)
What would be the best way to determine if a json object is actually a GeoJSON object? I've viewed various examples of GeoJSON, such as http://geojsonlint.com/ and it seems like it is quite flexible in how it can be specified.
Is there a sure-fire way to know whether a json object is GeoJSON or not?