Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

id should be a string or a Number (float or int) #149

Open
vincentsarago opened this issue Oct 23, 2023 · 1 comment
Open

id should be a string or a Number (float or int) #149

vincentsarago opened this issue Oct 23, 2023 · 1 comment

Comments

@vincentsarago
Copy link
Member

          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)

@eseglem
Copy link
Collaborator

eseglem commented Oct 23, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants