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

Allow YAML aliases when using yaml_safe_classes #46

Merged
merged 1 commit into from
Jan 4, 2024

Conversation

bshand
Copy link
Contributor

@bshand bshand commented Jan 4, 2024

We need to allow aliases in our YAML parsing.

The standard YAML emitter will introduce aliases in its output if there are repeated references in nested structures. Some of these are unavoidable, e.g. multiple references to the same date object. Sample YAML (observed in practice) might contain something like:

attendances:
- appointmentdate: &1 !ruby/object:DateTime 2023-01-01 00:00:00.000000000 Z
  appointmenttime: '11:15:00'
- appointmentdate: *1
  appointmenttime: '11:15:00'

Copy link
Contributor

@kenny-lee-1 kenny-lee-1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bshand bshand merged commit c764a4d into main Jan 4, 2024
12 checks passed
@bshand bshand deleted the feature/allow_yaml_aliases branch January 4, 2024 14:31
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.

None yet

2 participants