Skip to content

snake_case instead of camelCase #324

Closed
@jric

Description

@jric

I realize that camelCase is the defacto standard for JSON field names. That said, the most common convention in the data world is to use snake_case field names. There are a couple of good reasons to do this.

  1. Reason: Many databases are built or configured to be case-insensitive. CAMELCASEBECOMESHARDTOREAD under those conditions. ETLs that will take these events and store them into one of these databases, in order to be most usable, will also have to map the field names to something more readable.
  2. Reason: Snake_case contains more information than camelCase. McDougal Field can typically be mapped back and forth to McDougal_Field, but not without specialized knowledge can it be mapped back and forth to McDougalField.

Since we want our event field names to map onto the field names in the databases where we store them, I propose that we switch to use the data format that works best in the database world.

Downsides:

  1. Snake_case requires more bytes to encode
  2. camelCase is the standard for JSON
  3. It's a major change to the existing draft spec

If this proposal is accepted, I will create the patch.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions