JSON Naming Convention (snake_case, camelCase or PascalCase)

GeorgeU picture GeorgeU · Apr 4, 2011 · Viewed 297.6k times · Source

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?

Answer

Tho picture Tho · Oct 10, 2013

In this document Google JSON Style Guide (recommendations for building JSON APIs at Google),

It recommends that:

  1. Property names must be camelCased, ASCII strings.

  2. The first character must be a letter, an underscore (_) or a dollar sign ($).

Example:

{
  "thisPropertyIsAnIdentifier": "identifier value"
}

My team follows this convention.