-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Parse YAML Keys with dots as dereferenced Map #431
Comments
I don't think YAML spec consider these identical. Some libraries/frameworks can do that but I don't think that is conceptually part of YAML. Lower level YAML decoding for jackson-dataformat-yaml is handled by SnakeYAML library which would transparently process dotted names, if that was mandated by YAML specification. |
Thank you for your response! 👋🏻
Yes, I've read that, too & it makes sense to a certain degree. It's just that, I have read & experienced myself in projects, that the YAML Is it possible to use Jackson to parse a generic YAML source like that? What would I do about that? I'm currently not sure which solution I would use for such a case. For context, I need this for the Rancher API, which converts some YAML into this dotted format & I need to reverse those key value pairs into their original hierarchy. |
I can see how an option to expand such notation on reading would be useful: I think the way it should work would be for underlying However, although I can see how it should conceptually work, implementing this is a different matter, not trivial thing to achieve. But if anyone has time and interest, I'd be happy to help. |
That makes sense. Since I wasn't sure, what to do about it, I am in the process of implementing my own way of handling this in Kotlin. I am however not sure, if this would be of any use for an official implementation in regards to this project, since I'm not sure some Kotlin stuff is javafiable in a reasonable way. It's far from finished yet, so I don't know, yet, though. Maybe I can provide the implementation, once I'm done & then we will see, if that's of any use. 👍🏻 |
Sounds good @theAkito. Kotlin components cannot be included in (or depended on by) core components, but an implementation could definitely help inspire improvements in form of Java code (just as an example). Besides, similar path expansion/contraction might be useful for other formats, not the least json. In fact, building something that would expand/contract document expressed as |
When parsing something like this
it should be parsed as
but it is parsed with the dots, as if those were valid key names.
Is there a configuration option for this? I have found no documentation whatsoever on this.
The text was updated successfully, but these errors were encountered: