Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strip leading underscores in object field names. #40

Merged
merged 7 commits into from
Sep 7, 2023

Conversation

NathanReb
Copy link
Owner

@NathanReb NathanReb commented Sep 7, 2023

Fixes #38

Re-opening of #39 with added test cases and changelog entry for [@as "fieldname"] support.

CC @mefyl

mefyl and others added 7 commits July 20, 2022 12:43
@NathanReb NathanReb merged commit fb53d67 into main Sep 7, 2023
3 checks passed
@NathanReb NathanReb deleted the feature/strip-leading-underscore branch September 8, 2023 09:32
mseri pushed a commit to ocaml/opam-repository that referenced this pull request Sep 11, 2023
CHANGES:

### Added

- Add support for `[@as "field_name"]` attribute to allow forbidden
  ocaml record field names, such as capitalized words, to be used as JSON
  objects field names (NathanReb/ppx_yojson#40, @mefyl)

### Changed

- Ignore leading underscores in object field names allowing use
  of ocaml keywords such as `type` or `object` as JSON objects field names
  (NathanReb/ppx_yojson#40, @mefyl)
nberth pushed a commit to nberth/opam-repository that referenced this pull request Jun 18, 2024
CHANGES:

### Added

- Add support for `[@as "field_name"]` attribute to allow forbidden
  ocaml record field names, such as capitalized words, to be used as JSON
  objects field names (NathanReb/ppx_yojson#40, @mefyl)

### Changed

- Ignore leading underscores in object field names allowing use
  of ocaml keywords such as `type` or `object` as JSON objects field names
  (NathanReb/ppx_yojson#40, @mefyl)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for field renaming to workaround eg. OCaml keywords.
2 participants