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

Tags on mappings and sequences #147

Open
ExpHP opened this issue Jan 17, 2020 · 1 comment
Open

Tags on mappings and sequences #147

ExpHP opened this issue Jan 17, 2020 · 1 comment

Comments

@ExpHP
Copy link

ExpHP commented Jan 17, 2020

Currently, tags are only emitted on Scalar events, and not on MappingStart or SequenceStart. This in turn leads to a shortcoming in serde_yaml where tags cannot be used on array-like variants of an enum.

!vec3 [1.0, 0.5, 0.3]

Notice that libyaml supports tags on all three of these events.

This will be a breaking change, as it will require adding new fields to pub enum Event.

@kosta
Copy link

kosta commented Jul 21, 2022

If you end up implementing this, please do it in a way that one can deserialize yaml that contains arbitrary tags and serialize it again with the same tags, without losing information.

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

No branches or pull requests

2 participants