JsonValue
Create a JSON value from a JS value. When the provided JS value is an object, the JsonObject component will be used. When the provided JS value is an array, the JsonArray component will be used. Otherwise, the JS value will be serialized to a string, number, boolean, or null as appropriate.
import { JsonValue } from "@alloy-js/json";
<JsonValue jsValue={unknown} refkey={Refkey | Refkey[]} />
import { JsonValue } from "@alloy-js/json/stc";
JsonValue({ jsValue: unknown, refkey: Refkey | Refkey[] }).children(children)
Props
jsValue | unknown The JS value to serialize to JSON. When provided, thi |
refkey | optionalRefkey | Refkey[] The refkey or array of refkeys for the JSON value. When provided, this value can be referenced elsewhere via this refkey. |