Hi, Nic Ferrier pointed out that the JSON encoder can produce invalid JSON object keys in some cases. To guard against this, the attached patch adds a new function, `json-encode-key', which throws if it's object doesn't map to a JSON string. It then uses this function everywhere it creates JSON objects. I've only lightly tested it, but "It Should Work(TM)". Ted