From: Phil Tayo Date: 2010-02-19T10:44:48+09:00 Subject: Re: Convert Sequel Dataset to JSON Object > class Sequel::Dataset > def to_json > naked.all.to_json > end > end > > The naked part means that instead of model objects, plain hashes are > returned. > > Jeremy That's brilliant thanks Jeremy, it's working now. Now my problem is with the to_json function. I have a created_at field in the DB of type datetime and the to_json function seems to be splitting it up and formatting it weirdly, here's the result of my json object: [{"country":"uk","task":"qwdwd","created_at":{"json_class":"Time","n":407000000,"s":1266543411},"id":3}] I'll have to look into this when I have more time. -- Posted via http://www.ruby-forum.com/.