lukes / ISO-3166-Countries-with-Regional-Codes

ISO 3166-1 country lists merged with their UN Geoscheme regional codes in ready-to-use JSON, XML, CSV data sets
Other
2.19k stars 3.34k forks source link

Hyphen in keys #27

Open daverickdunn opened 6 years ago

daverickdunn commented 6 years ago

Using a hyphen in the object key names doesn't play very well with JavaScript and other languages. Please consider using underscores or camelCase.

lukes commented 6 years ago

Thanks for your comment.

I agree. I'm tempted to go with underscores, just because one of the keys is iso_3166-2, and camelized it would become iso31662.

What do you think?

andrerpena commented 5 years ago

I would prefer camelCase like "countryCode" but snake case, as proposed, for me, is better than kebab case.

jsejcksn commented 4 years ago

Snake case matches CSV heading data from ISO (noted in #31), and using a uniform whitespace character (snake_case) provides for a simpler conversion process than not using one (camelCase).

iso_3166-2 current iso31662 camel iso_3166_2 snake