ztcl::json array
Writes a JSON array from JSON values.
ztcl::json array ?JSON ...?
Description
Gives a JSON array of each JSON argument, in order. Each one is JSON text and goes in as it is. With no argument it gives [].
Arguments
| Argument | Type | Default | Description |
|---|---|---|---|
| JSON | JSON text | none | An element. |
Returns
The JSON text.
Examples
Each example of this page runs after package require ztcl::json.
% ztcl::json array 1 [ztcl::json bool yes]
[1,true]
% ztcl::json array
[]
Errors
Each count of arguments is valid, and the builder does not check the JSON text of its elements.
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztcl 1.0.0-beta.1