From: Rover Rhubarb Date: 2007-05-08T19:17:25+09:00 Subject: Re: using YAML as config Thanks all, for the effort made in replying. I'm pleased to see some solutions, and don't want to seem ungrateful, but I'm still a little disillusioned that xml is looking more straightforward even now. _why: thanks for the x-private tip, but I still have to put "click-click-Channel". Simple enough to read, but honestly to the average config hand-coder the xml is easier to remember and understand than the arcane "--- !!Channel". YAML should beat XML hands down - this is one case where it doesn’t. I know it's not the same because I'm going to have to parse the XML and build the objects - whereas YAML is going to deserialize into lovely objects right there on the spot - but still… James: thanks for giving me a solution that does what I asked exactly. But to be honest here I wanted to use an existing format, not invent one. (I guess it could be argued that by wanting to customize my YAML to get rid of the ---!! I am trying to invent one - but I really want that to be an existing feature of YAML) Greg: funny you mention json because I had a similar experience with it recently. I was coding some ajax for the first time (building a progress indicator) and I decided to pass my simple values as properties of a javascript object using json. Hours of tricky debugging later (very hard to find those bugs in the json code) I got it working but decided next time I'd use XML. The extra parsing step might cost more, but the bugs would be easier to find. I guess _why has the closest to what I was looking for. x-private is clearly even intended to be used for this. (BTW sorry to bellyache about docs, since I know its enough effort to code the libs in the first place, but this can't be an uncommon request so maybe the x-private could get more airtime in the docs somewhere). And I guess what I'd really like is for the x-private tag in yaml_as to allow the --- !! to be skipped to. thanks again all -- Posted via http://www.ruby-forum.com/.