Tk Library Source Code

View Ticket
Login
Ticket UUID: 3426178
Title: extra "$" in json::list2json
Type: Bug Version: None
Submitter: a11426 Created on: 2011-10-20 03:26:38
Subsystem: json Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2011-11-11 04:06:55
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2011-11-10 21:06:55
Description:
perhaps I am misunderstanding the code, but it appears there is an extra "$" on line 315 of json.tcl in the function json::list2json. Currently creating a list and sending it to this functions produces what appears to be invalid json.

Example 1:

package require json
set z [list {"first"} {"second"} {"third"}]
json::list2json $z

The output of the above code on my debian unstable system with tcl8.5 and tcllib-1.13 is:

[$"first","second","third"]

Note the extra $. I would expect the output to looks like this:

["first","second","third"]
User Comments: andreas_kupries added on 2011-11-11 04:06:55:

allow_comments - 1

Confirmed. Fix committed to CVS head.