Is it a GeoJSON geometry?
Value
Logical vector; TRUE for a JSON object carrying a GeoJSON "type"
(Point, Polygon, Feature, FeatureCollection, ...) together with a
"coordinates", "geometry", "geometries", or "features" member.
Structural (regex) check, not a full JSON parse.
See also
Other geometry detectors:
is_wkb(),
is_wkt_geometry()
Examples
is_geojson(c('{"type":"Point","coordinates":[30,10]}', "{}", NA))
#> [1] TRUE FALSE NA