Skip to content
loading...

re: snake_case, camelCase, or dash-case? VIEW POST

FULL DISCUSSION
 

Forgot to mention: one thing that really bugs me about JS/JSON is that the JS convention is lowerCamelCase, but the JSON convention is snake_case. Having these two be different really throws me off a lot, given how interrelated they are.

 

Can I ask where you’ve seen snake case as the standard for JSON? I very rarely see it, and I’ve definitely never seen an official recommendation for it.

 

Google APIs (place search/geocode stuff), the API of the web service I work on at my job (Awning Tracker), and... huh. Now that you mention it, I can't think of any other examples. I guess I haven't seen as many different JSON APIs as I'd started to think (I shouldn't count my own website lol). I just found out that apparently the standard is supposed to be camel. TIL.

Interesting. I wonder why Google chose to do that. Maybe it makes it more consistent since they do a lot of their APIs for multiple languages, and they picked a snake language as their favorite.

code of conduct - report abuse