Στις 20/8/2019 18:04, ο Massimo Manghi έγραψε:
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


Dear Massimo,

I think that this command exists, but is undocumented:

https://core.tcl-lang.org/tcllib/doc/trunk/embedded/md/tcllib/files/modules/json/json.md

So, not supposed to be used.

Regarding json, I am using the rl_json library. Not a great API, but works and is somewhat fast.

Best,

George




---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscr...@tcl.apache.org
For additional commands, e-mail: rivet-dev-h...@tcl.apache.org

Reply via email to