jyaml

JYaml: dump object without including class name

I have an ArrayList of objects being dumped to a YAML string and have been comparing the performance of JYaml and SnakeYaml in handling this. ArrayList<HashMap> testList = new ArrayList<HashMap>(); HashMap<String, String> testMap1 = new HashMap<String, String>(); HashMap<String, String> testMap2 = new HashMap<String, String>...

Perl YAML::Syck encoded string, howto properly decode in Java using JYaml?

Using beanstalkd and putting a job in tube/queue that contains a hash that is YAML::Syck encoded (with $YAML::Syck::ImplicitTyping = 1). I need some syntax help on the Java end, as to how to decode handle that string pulled from the beanstalkd job. The Perl hash ends up being encoded as a YAML string that looks like this: --- NameFir...

JYAML: Serialize/deserialize nested/inner classes

First of all, Merry Christmas to everyone! Now to my question: Let's say I have the class Outer with some inner class Inner. As a field in Outer, I have a List<Inner>, which i then want to dump to a YAML file. I do this like so: Outer o = new Outer(); o.innerList = new ArrayList<Inner>(); o.innerList.add(new o.Inner()); ... Yaml.dump(o...

JYaml refuses to cast a number as a string, regardless of quotes or !!str

Hi everyone! Has anyone else had a problem with JYaml 1.3 where on Yaml.load it is casting a number (like 102) as an Integer, even if you put it in quotes? For example, here's a small snippet from my yaml file: . . . listValues: "102": Joe "101": John . . . The 102 and 101 get constructed into the object created by Yam...