Replies: 10 comments 2 replies
-
|
Curious about this too. |
Beta Was this translation helpful? Give feedback.
-
|
We've had this issue too. I think it would be great if
Among these, I'd prefer 2, but 3 would probably make more sense (and move to 2 in a future major version).
|
Beta Was this translation helpful? Give feedback.
-
|
+1. Any roadmap/ETA on this? (Personally only concerned with not having to quote 'yes', 'no', 'on' and 'off', though obviously it's either 1.1 or 1.2!) |
Beta Was this translation helpful? Give feedback.
-
|
GitLab runner fails with otherwise perfectly valid YAML files because of this library using an obsolete version. Will it ever get updated? It’s been 17 years since the release of YAML 1.2. You might consider switching to |
Beta Was this translation helpful? Give feedback.
-
|
Should maintainers for respective gems be consulted? |
Beta Was this translation helpful? Give feedback.
-
|
Related: https://kddnewton.com/2025/12/25/psych-pure.html
|
Beta Was this translation helpful? Give feedback.
-
|
FWIW, JRuby's version of the psych gem has been using a YAML 1.2 backend for a few years (SnakeYAML-Engine), so this is only an issue for the libyaml-based extension. |
Beta Was this translation helpful? Give feedback.
-
|
If |
Beta Was this translation helpful? Give feedback.
-
|
PS! Taking a step back, YAML may feel like something of a miss, since it's disproportionately complex compared to its use (human-readable and easily editable configuration or data files). JSON, with all its noisy and intuitively redundant double-quotes, is ironically much faster to parse. TOML is yet more verbose once you want tree data. But guess we just have to work with what we have and not fall prey to the trap of inventing yet another yet another. {
"JSON": "(LL(1) / recursive-descent — deterministic one-token lookahead)",
"users": [
{
"id": 1,
"name": "A"
},
{
"id": 2,
"name": "B"
}
],
"flag": true
}# YAML (context-sensitive; indentation-based — not LL(1); parsed with block/flow state machines)
users:
- id: 1
name: A
- id: 2
name: B
flag: true# TOML (mostly LL(1)-friendly for key/value/arrays; tables introduce stateful sections)
[[users]]
id = 1
name = "A"
[[users]]
id = 2
name = "B"
flag = true |
Beta Was this translation helpful? Give feedback.
-
|
I don't think the performance of the pure-Ruby yaml backend is where it needs to be yet, but perhaps some day. There's also benefits from using established libraries that have been verified and optimized for years. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi 👋 ,
Many thanks for all the work here, I'm very glad to parse some YAML files without thinking to it.
Today I had to investigate about a bit more, since a user made us an unexpected feedback, especially for Norwegian 🇳🇴 people.
Let's take this yaml file about languages:
After some parsing for OpenAPI documentation, generated description was:
Obviously, Norwegian language was translated as
false.Digging into this, I understood it was YAML normal behavior for version 1.1, and that it will be changed with YAML 1.2
Of course we've suggested a workaround, to adapt YAML file with
'no'instead ofno.But just for asking, do you plan to support this new YAML spec version?
Beta Was this translation helpful? Give feedback.
All reactions