GeorgeU GeorgeU - 1 month ago 21
JSON Question

JSON Naming Convention

Is there a standard on JSON naming? I see most examples using all lower case separated by underscore (lower_case). But, can you use PascalCase or camelCase?

Answer

There is no standard, but I have seen 3 styles you mention ("Pascal/Microsoft", "Java" (camelCase) and "C" (underscores)). So it mostly seems to depend on what background developers of the service in question had; those with c/c++ background (or languages that adopt similar naming, which includes many scripting languages, ruby etc) often choose underscore variant; and rest similarly (Java vs .NET). Jackson library that was mentioned, for example, assumes Java bean naming convention (camelCase)