Skip to content

[DONE] Remove Integers and only use Floats #82

Answered by eseglem
eseglem asked this question in Ideas
Discussion options

You must be logged in to vote

I decided the best thing to do was actually email the geojson working group about this. The thread can be found here: https://mailarchive.ietf.org/arch/msg/geojson/B6N2iLvHxsBD-xTdSHp6Mpo0YVs/

I believe the answer is that JSON is a method of transportation, and does not attempt to limit how a consumer represents a number internally. It just wants to convey values. So it is up to an implementation as to how the handle it.

Now, I still find it compelling to use just float in the pydantic representation of it for a few reasons:

  • Consistency. Some of the numbers will certainly be floats, and I would rather see all of them be the same type, not a list of mixed types.
  • JavaScript, where JSON cam…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@eseglem
Comment options

eseglem Aug 2, 2022
Maintainer Author

Comment options

eseglem
Aug 3, 2022
Maintainer Author

You must be logged in to vote
2 replies
@geospatial-jeff
Comment options

@sthagen
Comment options

Answer selected by vincentsarago
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants