|Title:||json2dict improvements index json arrays in dict|
|Submitter:||cwjolly||Created on:||2010-03-10 03:04:44|
|Status:||Open||Last Modified:||2016-04-28 07:42:14|
anonymous (claiming to be heinrichmartin) added on 2016-04-28 07:42:14:
Please don't break the representation of lists and dicts. Although the idea of http://rosettacode.org/wiki/JSON#Tcl breaks the EIAS principle and makes use of [::tcl::unsupported], the suggested change would break that working code. It looks like you want to default to legacy behavior, so my comment might be void. It is just to give another view on the topic.
anonymous added on 2013-07-02 22:46:52:
The quoting around all values is unnecessary; it is sufficient to simply require that a value (string, number or bareword) is parsed as a list of length 1.
cwjolly added on 2010-03-10 10:39:18:
File Added - 366074: jsondriver2.tcl
cwjolly added on 2010-03-10 10:38:29:
File Added - 366073: json.tcl
cwjolly added on 2010-03-10 10:37:46:
Looked at the new code and modified it to work like what I had done with the 1.0 version with some minor changes. The value quoting is optional and rather than using args to json2dict I use defaults so instead of "json2dict jsontxt -indexlists 1 " you have "json2dict jsontxt true true " where first true is for indexlists and 2nd true is for quotevalues. I also attach the modified driver script.
cwjolly added on 2010-03-10 10:06:05:
File Added - 366072: jsondriver.tcl
cwjolly added on 2010-03-10 10:04:49:
File Added - 366071: json.tcl