32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
+
-
+
+
+
|
# We need a JSON parser to effectively test the JSON produced by
# fossil. It looks like the one from tcllib is exactly what we need.
# On ActiveTcl, add it with teacup. On other platforms, YMMV.
# teacup install json
# teacup install json::write
if {[catch {package require json}] != 0} then {
puts {
puts "The \"json\" package is not available."
The "json" package for Tcl is not available.
Please see: https://core.tcl-lang.org/tcllib
}
test_cleanup_then_return
}
proc json2dict {txt} {
set rc [catch {::json::json2dict $txt} result options]
if {$rc != 0} {
protOut "JSON ERROR: $result"
|