util::json::indent (public, deprecated)
util::json::indent [ -simplify ] json
Defined in packages/acs-tcl/tcl/json-procs.tcl
Deprecated. Invoking this procedure generates a warning.
Indent a JSON string using the legacy formatter. When ns_json is available, use this type-preserving alternative:
set triples [ns_json parse -output triples -- $json] ns_json value -pretty -- $triplesThe native formatter preserves all fields. The legacy -simplify option removes fields and has no direct equivalent.
- Switches:
- -simplify (optional, boolean)
- If true, remove all fields that don't contribute to the structure of the object/array combination being described by the string.
- Parameters:
- json (required)
- The string to indent
- Returns:
- The beautifully indented, and optionally simplified, string
- Partial Call Graph (max 5 caller/called nodes):
- Testcases:
- No testcase defined.