Skip to content

Document mapping of snake_case to lowerCamelCase when validating json #358

@pnrobinson

Description

@pnrobinson

Document mapping of snake_case to lowerCamelCase when validating json

The protobuf schema uses snake_case:

time_at_last_encounter

however, when I run pfx-tools example, the json examples using lowerCamelCase

E.g.

  "subject": {
    "id": "proband C",
    "timeAtLastEncounter": {
      "age": {
        "iso8601duration": "P27Y"
      }
    },

At first I thought this was a bug, but I see it is documented (albeit in the most cursory fashion) in the protobuf docs:

https://developers.google.com/protocol-buffers/docs/proto3#json

I suspect this is highly non-obvious to non-proto-geeks.

Add this here: https://phenopacket-schema.readthedocs.io/en/latest/schema.html

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