samayo / country-json

A simple data of the world by country each in JSON format.
https://data.world/samayo
MIT License
1.07k stars 804 forks source link

Big cleanup #188

Closed awwsmm closed 4 years ago

awwsmm commented 4 years ago

...but breaking changes for downstream users. Worth it?

samayo commented 4 years ago

Hi, thanks again for the big support. Just 2 questions, any idea why you changed the indentation and string for the boolean values?

awwsmm commented 4 years ago

No problem!

The indentation was uneven across the files. Most use 4-space indentation, but some (like by-currency-name) used 2 (and one file used 3, if I remember correctly). I just changed them to all use 4, which seems to be the most popular among them. Of course, JSON will parse correctly no matter what the indentation level is, but I thought it would be better to just have a consistent indentation scheme across all files.

For the booleans, JavaScript will automatically convert "1" to true and "" to false, but not all languages will do that. Since this is what was intended anyway, I just changed them myself so that they're more useful to people working in other languages.

samayo commented 4 years ago

Thanks, but i have an issue with the boolean changes, as it will break applications expecting the value to be str, maybe it would have been better to add "0" for false, but i get your reasoning, the problem is backward compatibility

awwsmm commented 4 years ago

Thanks, but i have an issue with the boolean changes, as it will break applications expecting the value to be str, maybe it would have been better to add "0" for false, but i get your reasoning, the problem is backward compatibility

No worries. Changed them back to strings. Maybe later you can change them to booleans and do a minor version bump.

awwsmm commented 4 years ago

Anything else you'd like me to change?

samayo commented 4 years ago

Anything else you'd like me to change?

No, thanks this was a big help. thank you!!