util::json::gen_inner (private)
util::json::gen_inner value
Defined in packages/acs-tcl/tcl/json-procs.tcl
Generate a JSON string for a sub-list of a Tcl JSON "object".
- Parameters:
- value (required)
- A list representing a JSON object/array or value
- Returns:
- Valid JSON object, array, or value string.
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.
Source code: foreach { type arg } $value { switch -- $type { _object_ { return [util::json::object2json $arg] } _array_ { return [util::json::array2json $arg] } default { if { ![string is double -strict $value] && ![regexp {^(?:true|false|null)$} $value]} { set value "\"$value\"" } # Cleanup linebreaks regsub -all -- {\r\n} $value "\n" value regsub -all -- {\r} $value "\n" value # JSON requires new line characters be escaped regsub -all -- {\n} $value "\\n" value return $value } } }XQL Not present: Generic, PostgreSQL, Oracle