Is there a standard on JSON naming?
I see most examples using all lower case separated by underscore, aka snake_case
, but can it be used PascalCase
or camelCase
as well?
This question is related to
json
camelcasing
pascalcasing
snakecasing
In this document Google JSON Style Guide (recommendations for building JSON APIs at Google),
It recommends that:
Property names must be camelCased, ASCII strings.
The first character must be a letter, an underscore (_) or a dollar sign ($).
Example:
{
"thisPropertyIsAnIdentifier": "identifier value"
}
My team follows this convention.