From: Jeremy Evans Date: 2010-02-19T01:35:05+09:00 Subject: Re: Convert Sequel Dataset to JSON Object Phil Tayo wrote: > What I'm trying to return to my xhtml is a JSON object containing all of > my tasks that are returned from the DB, does anyone have any pointers on > how to do it? FYI, a Sequel dataset is an abstract representation of an SQL query, it doesn't contain any records itself. Assuming that Array#to_json works correctly, you could define: class Sequel::Dataset def to_json all.to_json end end and then call to_json on a dataset to get the query results in JSON format. Jeremy -- Posted via http://www.ruby-forum.com/.