JsonArray
Create a JSON Array. You can provide children, or else pass a JS value that will be serialized to JSON.
Overload 1
Section titled “Overload 1”Create a JSON Array by serializing the given JavaScript array to JSON.
import { JsonArray } from "@alloy-js/json";
<JsonArray jsValue={unknown[]} refkey={Refkey | Refkey[]} />import { JsonArray } from "@alloy-js/json/stc";
JsonArray({ jsValue: unknown[], refkey: Refkey | Refkey[],}).children(children)| jsValue | unknown[]The value to serialize to a JSON array. |
| refkey | optionalRefkey | Refkey[]The refkey or array of refkeys for the JSON array. When provided, this value can be referenced elsewhere via this refkey. |
Overload 2
Section titled “Overload 2”Create a JSON Array by providing the children. To create an array element, see JsonArrayElement.
import { JsonArray } from "@alloy-js/json";
<JsonArray refkey={Refkey | Refkey[]}> {children}</JsonArray>import { JsonArray } from "@alloy-js/json/stc";
JsonArray({ refkey: Refkey | Refkey[] }).children(children)| children | optionalChildrenThe contents of the JSON Array. Likely to contain JsonArrayElement components. |
| refkey | optionalRefkey | Refkey[]The refkey or array of refkeys for the JSON array. When provided, this value can be referenced elsewhere via this refkey. |
See also
Section titled “See also”- [unresolved link]