Property Naming #34
-
According to Property Names
According to the ECMA definition for the JSON data interchange syntax:
As I believe most API developers can attest, there are many platforms in production today that have committed to a variance here and are unable to change it as it would be a breaking change. If they've committed to I would push back against the MUST part here for a simple reason. I use I know there could still be ambiguity on where separators are placed, but that would also apply to all of the possible casings. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I completely agree with you @nateklaiber . I am also a snake case fan given its clarity, its native usage in javascript/typescript deserialization, etc. However, more important than the chosen serialization casing is its consistency. If we were starting an ecosystem from scratch, I would probably go with Like many organizations, SPS has an interesting bifurcation in casing today in its APIs internally. Based on some internal technical reasons, existing usage, and pre-existing standards we were starting from, the SPS API Standards have landed on We did, however, recognize the inconsistency you mention when used with acronyms and abbreviations in
|
Beta Was this translation helpful? Give feedback.
I completely agree with you @nateklaiber . I am also a snake case fan given its clarity, its native usage in javascript/typescript deserialization, etc. However, more important than the chosen serialization casing is its consistency. If we were starting an ecosystem from scratch, I would probably go with
snake_case
as a personal preference. But interestingly enough,camelCase
is an incredibly popular default method of property serialization in different frameworks.Like many organizations, SPS has an interesting bifurcation in casing today in its APIs internally. Based on some internal technical reasons, existing usage, and pre-existing standards we were starting from, the SPS API Standar…