JsonArray
Create a JSON Array. You can provide children, or else pass a JS value that will be serialized to JSON.
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)
Props
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
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)
Props
children | optionalChildren The 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. |