Comments (9)
I would also like to know why this is considered invalid. I've traced the BNF for flow sequences in YAML 1.1 (http://www.yaml.org/spec/1.1/#id931285), which is the version that libyaml (http://pyyaml.org/wiki/LibYAML) implements. Flow sequences of words starting with colons appear to be perfectly valid in YAML 1.1. If this is invalid because it is actually a libyaml bug, then just say so and I'll be happy to file a bug report against libyaml.
schmidt: In case you haven't found this yet, the workaround in psych is to define the array of symbols in the long form:
symbol-array:
- :foo
- :bar
- :baz
from psych.
Invalid.
from psych.
Why is this considered invalid? I'm running into the very same issue atm. How did you solve it?
from psych.
Thanks @amikula,
I forgot to come back, to say how I fixed it. I also just changed the locale files to use the multi-line version, which was some work. While doing so, I ran into some other ambiguities between psych and syck - chiliproject/chiliproject@1eee731...90987ca for details. But I was not able to see, who's fault they are, so I did not file bug reports.
from psych.
@kronos Could you please clarify why this is an invalid bug. I ran across this issue and find it pretty annoying.
Thanks
from psych.
Hi, same issue here. Still it works on syck
from psych.
I really don't remember why I marked the issue as invalid. May be we should ask @tenderlove.
from psych.
Just in case, wrote a quick regexp that may help anyone going through this https://gist.github.com/4078769
from psych.
It's a known issue in libyaml. It's technically valid, but if it's supported, causes an ambiguity in the grammar. Here is a relevant ruby-core thread, along with the libyaml thread, and the wiki page with possible solutions.
from psych.
Related Issues (20)
- Error loading Psych gem specification on Ruby 3.2.2 HOT 1
- YAML string in exponential format cannot be loaded by YAML 1.2 parser
- Psych::BadAlias error with simple alias HOT 1
- Version 4.0.5 breaks Date deserialization HOT 1
- JSON is invalid
- Dates with five digit years throw exception HOT 1
- Prevent snakeYAML add backslash when dump multiple line string HOT 1
- YAML.dump(date) generates warnings with Rails 7.0.7+ HOT 1
- [DOC] Link fragment does not work
- YAML 1.2 compliance possibly breaking VCR HOT 3
- Add settings for alias limits, recursion, and duplicate keys HOT 8
- TypeError: allocator undefined for Nokogiri::HTML5::Document on YAML.unsafe_load_file HOT 3
- Psych 5.1.1 fails to load on JRuby 9.x HOT 10
- Singleton Classes Aren't round-trippable
- Issue between psych and mini_racer on platform x86_64-linux HOT 1
- Psych::DisallowedClass when loading fixtures HOT 3
- Strange `FrozenError` on `Psych.load` HOT 1
- Kernel.y interferes with code relying on method_missing HOT 3
- SSL issues preventing installation HOT 1
- yaml parsing is wrong when key's value has leading colon HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from psych.