Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Enable support for tags #115

Closed
EliSnow opened this issue Oct 27, 2018 · 1 comment
Closed

Enable support for tags #115

EliSnow opened this issue Oct 27, 2018 · 1 comment

Comments

@EliSnow
Copy link

EliSnow commented Oct 27, 2018

It would be nice if YAML tags could be used as a representation for an enum tag representation.

I don't have it fully fleshed out since I'm not sure how the internals of serde parsing works, but perhaps something like:

foo: !bar baz

could automatically be interpreted as:

foo:
  bar: baz

representing an enum type which is externally tagged. Again I don't know how serde internals work, but could something like this work with any enum representation?

Could be related to #91

@dtolnay
Copy link
Owner

dtolnay commented Oct 27, 2018

Thanks, I would be willing to consider a PR that implements this.

dtolnay added a commit that referenced this issue Oct 28, 2018
Allow YAML tags to be used to specify an enum variant. Closes #115
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants