Skip to content

JsonArray

Create a JSON Array. You can provide children, or else pass a JS value that will be serialized to JSON.

Create a JSON Array by serializing the given JavaScript array to JSON.

import { JsonArray } from "@alloy-js/json";
<JsonArray jsValue={unknown[]} refkey={Refkey | Refkey[]} />
jsValueunknown[]

The value to serialize to a JSON array.

refkeyoptionalRefkey | Refkey[]

The refkey or array of refkeys for the JSON array. When provided, this value can be referenced elsewhere via this refkey.

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>
childrenoptionalChildren

The contents of the JSON Array. Likely to contain JsonArrayElement components.

refkeyoptionalRefkey | Refkey[]

The refkey or array of refkeys for the JSON array. When provided, this value can be referenced elsewhere via this refkey.

  • [unresolved link]