From: Brian Candler Date: 2009-01-20T19:37:15+09:00 Subject: Re: Desktop <-> Web P.S. I'm not sure what is the "right" way to serialize Ruby objects in JSON. I took the to_json and json_create code from the ruby json library documentatation, which gives {"json_class": "name", "data": ["values", ...]} Maybe it would be more natural to serialize a Ruby object as {"attr_name": "attr_value", ...}, since { ... } itself denotes an "object" according to the JSON specification. However I've also seen examples on the web using a hybrid: {"json_class": "name", data: {"attr_name": "attr_value", ... } } -- Posted via http://www.ruby-forum.com/.