check-geojson development is supported by 🌎 placemark.io
geojsonhint for 2021.
I started working on geojsonhint in 2014. It's a pretty useful project. But it has been stagnant for a long time now, and has some annoying long-term issues.
check-geojson is intended to be a full successor for geojsonhint. Like geojsonhint, it is tailored to a particular usecase: writing GeoJSON by hand, or quickly sussing out issues in GeoJSON that you've received.
Unlike geojsonhint, this checker only produces errors, not warnings. So things that geojsonhint would warn about, like:
This does not check for. Additionally, the crs
member is ignored by this tool: as of
the latest GeoJSON specification, this is not used.
We're using the same test fixtures as geojsonhint as a starter.
Not finalized yet
import { check } from "check-geojson"
try {
const parseValue = check('… geojson string …')
} catch (e) {
/// e.issues
}
Generated using TypeDoc