On Fri, Apr 29, 2011 at 17:34, Peter Meier <peter.me...@immerda.ch> wrote:
>> I am playing with snakeyaml and trying to use a custom class to parse >> yaml returned by puppet as mentioned in >> http://code.google.com/p/snakeyaml/wiki/Documentation#Custom_Class_Loader >> >> But I am not sure how to deal with "--- !ruby/object:Puppet::Run:" and >> "!ruby/sym report: !ruby/object:Puppet::Transaction::Report" >> >> These seem to be ruby specific. > > afair you should be able to just strip that off, before pass it to the > yaml reader. There have been some discussion about that on the list and > I think this was the solution. *nod* The two tags are: '!ruby/sym' which identifies a "symbol" in Ruby. Translating it as a string should be more than satisfactory for most practical purposes. The other identifies a specific Ruby object; you might want to model that as a Java object, or just treat it as a pool of data – whatever works for you. If you lost both those YAML type tags you really wouldn't loose much information. Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <dan...@puppetlabs.com> ✆ Contact me via gtalk, email, or phone: +1 (877) 575-9775 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.