We use this yajl-json binding for Tcl that we use for serializing and deserializing:
https://github.com/flightaware/yajl-tcl The serialization method doesn't take a dict, but it's more explicit about types that way. Jeff On Tue, Aug 20, 2019 at 10:04 AM Massimo Manghi <mxman...@apache.org> wrote: > Hello everyone > > I'm asking here because this is more related to web programming than Tcl > programming at large. > > I was using Tcllib's json utility to compose return messages to be sent > in response to Ajax requests generated with JQuery. I assumed that > creating such Json messages was rocket science and ended up wasting time > debugging an error that arose simply because of missing quotes > > package require json > ::json::dict2json [dict create a1 v1 a2 v2 a3 v3 a4 "v v v v4"] > {"a1": v1 > ,"a2": v2 > ,"a3": v3 > ,"a4": v v v v4 > } > > Ok, having a simple procedure that creates json correctly recognized and > parsed messages took a handful of seconds, still I grew uneasy after I > got to know that the Tcl standard Json utility is apparently useless for > a relatively common task such as sending data in response to an Ajax > interaction. > > Am I missing something? Is it possible that no one ever complained about > it? > > -- Massimo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org > For additional commands, e-mail: rivet-dev-h...@tcl.apache.org > >