-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Plans for the language independent types in YAML #3101
Comments
We currently bind |
Oh, I've never known that the YAML specification doesn't expect its applications to implement the language-independent types, shown in http://yaml.org/type/. I simply want to map those !!binary, !!bool, !!float, !!int and !!timestamp to/from the corresponding types in Crystal. Because I can easily migrate my old YAML resources into my Crystal application. However, I don't think the standard library has to support those types. Because those are optional. How is the Crystal team is thinking about supporting the types? |
I overlooked the similar issue #2235. |
Oh! Already referenced in #2235. Thanks. |
I think out YAML API is missing the concept of a schema. The default should be the default (bools, numbers, times) but one should be able to choose another one. It's just that the fail-safe schema was easier to implement at first, because everything is a string, and then you can parse the string in the way that you need it. |
Thank you for letting me hear your thoughts! I think the capability to switch between sets of schemas is a great concept. So far, you think that those typed values should be supported as default:
OK? |
As explained in #4771 this boils down to support the YAML Core Schema instead of the Failsafe Schema as supported by |
No, this is a different issue and only related to supporting Core Schema. If we can access the datatypes from JSON Schema it will bring us closer to supporting Core Schema. But there are some more language-independent types which are not required for Core Schema, so it must be considered which of these additional ones should be available in Crystal. |
Hi. Do you have any plans to implement the full YAML 1.2 specification in the standard library?
The text was updated successfully, but these errors were encountered: