Skip to content

JSONValue

type JSONValue =
| string
| number
| boolean
| null
| {
[key: string]: JSONValue;
}
| JSONValue[];

Defined in: src/types/json.ts:17

Represents any valid JSON value. This type ensures type safety for JSON-serializable data.

const value: JSONValue = { key: 'value', nested: { arr: [1, 2, 3] } }
const text: JSONValue = 'hello'
const num: JSONValue = 42
const bool: JSONValue = true
const nothing: JSONValue = null