It seems to have been already done by Anthony, thanks for the quick fix! :)
Omri On Friday, July 27, 2012 4:33:34 PM UTC+2, Massimo Di Pierro wrote: > > Send me a patch and I will take a look. It is probably safe. > > On Friday, 27 July 2012 06:30:54 UTC-5, Omri Har-Shemesh wrote: >> >> I recently defined a pickled SQLCustomType field for automatic >> dumping/loading of inserted types to the field. >> The definition is: >> >> pickled = SQLCustomType( >> type = 'text', >> native = 'text', >> encoder = (lambda x: pickle.dumps(x)), >> decoder = (lambda x: pickle.loads(x)) >> ) >> >> I use it to store a dictionary of values, which I later retrieve and send >> to the client via an jsonrpc service. For this >> to work, I need to call the as_dict() method of the Row object I obtained >> from the database. >> The problem is that "dict" is not recognized as a serializable by the >> as_dict method. >> Is it safe to simply add it to the list of values already defined there? >> Is there a different way of letting the Row object >> know how to decode the value? Is there a way to do it so that next time >> when I update web2py it will stay defined? >> >> Thanks! >> Omri >> > --