example:
(= mydata (fromjson "{\"first\":\"Edgar\",\"last\":\"Poe\",\"age\":\"23\",\"dob\":\"Jan 19 1809\"}"))
(= datatypes (obj "first" 'text "last" 'text "age" 'integer "dob" 'date))
(= mydatabase (table))
arc> mydata #hash(("last" . "Poe") ("first" . "Edgar") ("age" . "23") ("dob" . "Jan 19 1809")) (defhook integer (val) (coerce val 'int)) (defhook date (val) (upcase val)) (def storedata (mydb typedb) (each field (keys mydb) (fill-table mydatabase (list field (aif (hook typedb.field mydb.field) it mydb.field)))) mydatabase) arc> (storedata mydata datatypes) #hash(("last" . "Poe") ("age" . 23) ("first" . "Edgar") ("dob" . "JAN 19 1809"))