util::json2dict (public)
util::json2dict jsonText
Defined in packages/acs-tcl/tcl/json-procs.tcl
Parse JSON text into a Tcl dict. This function is NOT based on the functions from the "util::json::" namespace, and is built on top of tDOM. It is a replacement for the "json::json2dict" in the tcllib package "json", but is on sample documents several times faster.
- Parameters:
- jsonText (required)
- JSON text
- Returns:
- dict containing the JSON objects represented by jsonText
- Author:
- Gustaf Neumann
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- json_to_dict
Source code: #ns_log notice "PARSE\n$jsonText" set doc [dom parse -json -- $jsonText] set result [expr {[::acs::icanuse "domDoc asTclValue"] ? [$doc asTclValue] : [util::tdomDoc2dict $doc]}] $doc delete return $resultXQL Not present: Generic, PostgreSQL, Oracle