developmentseed/geojson-pydantic

`id` should be a string or a Number (float or int)

vincentsarago opened this issue · 1 comments

          According to the specs the id is a `number`, which in JSON terminology should include `float` as well, no? It is probably not the best idea to use floats as an `id`, but if the specs allow it, the model should probably not reject it?

Originally posted by @bluenote10 in #91 (comment)

Interesting. I can't think of any reason to use a float, but the spec does seem to allow it.

If a Feature has a commonly used identifier, that identifier
SHOULD be included as a member of the Feature object with the name
"id", and the value of this member is either a JSON string or
number.

Might have to play with it some and be like StrictString, StrictInt, StrictFloat? Don't want to be changing the input types.