-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Using custom tags as keys? #46
Comments
Yes, custom tags are supported. To use them with Just to clarify your example, according to the spec it's parsed as a mapping with a key |
No I don't think so 😕 What I'm looking for is something that would parse to something like (in pseudo-JS code): {
foo: new Map([
[ new Baz, 'Hello' ]
])
} Not sure this can even be expressed in yaml though. |
Yes, that can be represented in YAML. What you're looking for is a custom schema for your data, i.e. a way of telling the parser that this particular thing should be represented by a For For With all of that, you'd end up with this YAML representation of your data: foo:
!baz : Hello |
Thanks for this library, this looks awesome and I'm going to play with it a bit.
Can we use custom tags as keys? i.e.:
The text was updated successfully, but these errors were encountered: