From: Sean O'Dell <sean@ce...> - 2004-07-12 17:16:20
I have been wondering if there's a way to do this in YAML, or perhaps as a
feature of Syck:
I want to be able to take over the implicit typing when loading a YAML file.
For example, when I load a YAML file in Ruby, true/false strings are
converted to a real Ruby true/false; strings wrapped by double-quotes are
automatically read in as real Ruby String objects, and so on.
Is there a way to register types so you don't have to explicitly type them in
YAML with !type or !!type?
As an example: I would like to prefix scalars with @ and have those get
converted automatically to a special type that I register.
Basically, is there a way to override the implicit typing mechanisms?
Get latest updates about Open Source Projects, Conferences and News.