From: "Matthias S." Date: 2011-02-10T06:46:14+09:00 Subject: Re: Best practice to create a JSON string of one object containing an array of other objects using R Running "ert2.rb" in console worked as expected. I want to use to_json capability within a rails project. In my project, I created class A and B as well as a controller to call the to_json method. I got: {"json_class":"A","items":[{},{}]} After that, I reinstalled json and json_pure, using version 1.5.1 of both now. Now it works as expected... @Thanks to Brian Rails 3.0.3 ruby 1.9.2p136 (2010-12-25 revision 30365) [i386-darwin9.8.0] json 1.5.1 json_pure 1.5.1 So, reinstalling/upgrading json libs might solve the problem... -- Posted via http://www.ruby-forum.com/.