WhiteHouse / api-standards

3.08k stars 901 forks source link

Recommend how capitalization is handled #25

Open philipashlock opened 11 years ago

philipashlock commented 11 years ago

URLs, XML, and JSON are all case sensitive. In many programing languages like javascript camel case is preferred for variable names, but API resources specified in a URL are often preferred to be all lowercase and hyphen separated, while the names of values in json are often lowercase and underscore separated. This seems to be the implied convention based on the examples shown and matches my own personal preference, but this should be clarified. Camel case seems appropriate as code, but not as data.