mapbox / geojsonhint

IMPORTANT: This repo will be archived. Use @placemarkio/check-geojson instead
ISC License
258 stars 37 forks source link

Invalid GeoJSON when using NULL on feature member ID #24

Closed iH8 closed 9 years ago

iH8 commented 9 years ago

This is not according to specification. The only thing that is stated in the spec. about the identifier is the following:

If a feature has a commonly used identifier, that identifier should be included as a member of the feature object with the name "id".

http://geojson.org/geojson-spec.html#feature-objects

Since nothing else is mentioned about the type of ID, it should adhere to the JSON spec where the property of an object can be any of the following: String, Number, null, true, false, Array or Object

tmcw commented 9 years ago

This part of the validator is written against the draft spec which specifies a string or number, not null or any other type.

iH8 commented 9 years ago

Ok, i see. Wasn't aware. I was in the midst of some confusion about this because of inconsistencies between geojson.io and geojsonhint.com All cleared up now. Sorry for the disturbance.