Ok, it sounds like an interesting case. I assume by “describes a Java
object” you mean that SnakeYAML has embedded Java type and instance
data into the YAML so it can be deserialized back to a Java object.
This is probably simply a case we don’t have implemented in our YAML
parser, since it’s based on the Ruby implementation of YAML.
Can you submit this as a feature request at http://bugs.jruby.org
please, ideally with some sample YAML or a Java+YAML+Ruby example
based on using SnakeYAML?
I’m getting a String (sent by a third party lib) which is formatted as
YAML, produced by SnakeYAML. This string describes a Java object. The
Java class is in the classpath. I now want to convert this string (which
represents an object) into a Ruby/Jruby/Java object. This object makes
it possible to interact with.
In MRI this is possible. I tried in Jruby:
You are right. Our partner serializes Java objects with SnakeYAML, I try
to deserialize these Strings to Java/JRuby objects.
I’ll post a feature request tomorrow. Therefore I construct some
samples.