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

Change boolean values from 1/0 to true/false #10

Closed
jcn opened this issue Jan 13, 2016 · 6 comments
Closed

Change boolean values from 1/0 to true/false #10

jcn opened this issue Jan 13, 2016 · 6 comments

Comments

@jcn
Copy link
Contributor

jcn commented Jan 13, 2016

A proposal from Tom Brown in the original draft:

"boolean" suggests true/false to me, but it looks like you want int number 0 or 1. if you think this may become 3 or more state an enum string may be clearer. if it you expect it to remain binary json true/false looks like a good fit.

The integers 0 and 1 evaluate as falsy and truthy in Javascript but not in other languages so converting these to true booleans would make these values more explicit. They would represent an additional several characters in the underlying file, which may or may not be a concern from a bandwidth perspective, but it's the only reason I could think to not make this change.

@jcn jcn changed the title Change boolean values from 1/0 to JSON true/false Change boolean values from 1/0 to true/false Jan 13, 2016
@fruminator
Copy link
Contributor

I like Boolean.
On Jan 13, 2016 9:31 PM, "Jesse Chan-Norris" [email protected]
wrote:

A proposal from Tom Brown in the original draft:

"boolean" suggests true/false to me, but it looks like you want int number
0 or 1. if you think this may become 3 or more state an enum string may be
clearer. if it you expect it to remain binary json true/false looks like a
good fit.

The integers 0 and 1 evaluate as falsy and truthy in Javascript but not in
other languages so converting these to true booleans would make these
values more explicit. They would represent an additional several characters
in the underlying file, which may or may not be a concern from a bandwidth
perspective, but it's the only reason I could think to not make this change.


Reply to this email directly or view it on GitHub
#10.

@dsgermain
Copy link
Contributor

Agree with this one as well. BTW, I'm the director of engineering at PBSC, pleasure to meet you all.

@jasongdove
Copy link
Contributor

I like true/false.

@andmos
Copy link

andmos commented Apr 19, 2019

Might be late to the party, but as a writer of client library that uses the GBFS standard, avoiding special handling of the bool types would be nice.

@heidiguenin
Copy link
Contributor

Hey all! Now that we're actually moving toward a versioning scheme and then likely making use of it right away with #147, I'd like to suggest we bundle up a few other small breaking changes, including this one.

Seems like we have consensus on this one. @jcn want to open a PR?

@heidiguenin
Copy link
Contributor

I've opened a PR for this over at #196 - let's move any more conversation there, and I'll close this in a few days.

antrim pushed a commit that referenced this issue Jan 27, 2020
Breaking change -- v2.0-RC

* Change boolean values from 1/0 to true/false
As per discussion on Issue #10 #10
adding new field definition: boolean values to be JSON booleans, not strings

* Add "Beta (v2.0-RC)" note
…before "Boolean values must be JSON booleans"…
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants