set JSON to "{"
set keys to getKeys(rec)
set i to 0
repeat with curKey in keys
if i > 0 then
set JSON to JSON & ","
end if
set JSON to JSON & "\"" & curKey & "\":\"" & getValue(rec, curKey) & "\""
set i to i + 1
end repeat
set JSON to JSON & "}"