is someone using yaml in jruby? I am looking for the best library
solution at the moment and testing around a bit. The ruby core classes
are working very good, except the fact that the to_yaml method doesn’t
like my options.
What I want to do in general with yaml is: serializiation of objects,
transfer data and a mix of both. That means use objects internally and
send them as data externally. Therefore I try to remove the hint to the
class (when you call any_custom_class.to_yaml) in the header.
Can someone provide me some hints or is someone using a yaml library
actively?
I know that the classes are working. My idea is to use the options which
appear in some documentations. (UseBlock, UserHeader, etc.)
This does not work, neither in ruby (mri) nor in jruby. Thats why I
asked if someone knows a better library or a trick which is not hacking
the modules of the yaml-library.
I tried the library you wrote (RbYAML) too. But I couldn’t find a hint
to a documentation which says using options is supported…
I am pleased about other hints. Thanks so far…
Marco
Ola B. schrieb:
to the class (when you call any_custom_class.to_yaml) in the header.
bug-to-bug compatible with YAML support in 1.8.7.
If you’re having trouble with something, please report it!
No, as far as I know, there are no libraries that expose this.
Of course, you could use JvYAMLb and fairly easily add support for those
options. The underlying Java library supports all of them (through the
class YAMLConfig).
In fact, I’m tempted to add support for some of those options to the
JvYAML gem. Would an API like this:
it’s me again. I noticed too late that my wish for a ruby-like API is a
little bit foolish.
In my jruby context I forgot that your libraby (JvYAML) is a JAVA
library =)
Of course the API should be java-like. Because of my missing experience
in the
java environment I cannot assure you that your API is the best but I
would say it is good to work with.
Maybe a more java-near developer can provide his opinion to that
topic…
Do you know whether you implement this feature and when it will be
available?
Thanks for your engagement!
Greetings,
Marco
Marco D. schrieb:
continues maintaining the ruby classes…
This does not work, neither in ruby (mri) nor in jruby. Thats why I
:foo => :bar expresses the YAML stuff? I think this API is useful.
Maybe more ruby-like: JvYAML.dump({:foo => :bar}, :use_header => false,
:indent => 8)
The main point is that these options should be documented. That’s the
problem of the most ruby yaml libraries.
Ok, the option to use every Java Yaml lib exists. I thought about this
before, but I wanted to try out some ruby-libs. Maybe someone continues
maintaining the ruby classes…
Greets,
Marco
Ola B. schrieb:
hint to a documentation which says using options is supported…
those options. The underlying Java library supports all of them
(through the class YAMLConfig).
In fact, I’m tempted to add support for some of those options to the
JvYAML gem. Would an API like this:
Currently I am thinking about what to use. Therefore I try many libs. I
am looking for the best way to handle YAML in jruby in general. So my
search started at the (j)ruby core classes. My purpos is to work with
objects internally and send them as maps (without object context or
references) to other applications. That’s why I am looking for a way to
implement this.
thanks so far =)
greetings,
marco
Ola B. schrieb:
would say it is good to work with.
Cheers
Maybe more ruby-like: JvYAML.dump({:foo => :bar}, :use_header =>
I tried the library you wrote (RbYAML) too. But I couldn’t find a
Of course, you could use JvYAMLb and fairly easily add support for
Cheers
To unsubscribe from this list, please visit: