Saltearse al contenido

utils/jsonParse

Esta página aún no está disponible en tu idioma.

function jsonParse<T>(text: string): T

Defined in: studiocms/packages/studiocms/src/utils/jsonParse.ts:9^

Parses a JSON string and returns the resulting object.

T extends object

The expected type of the parsed object.

string

The JSON string to parse.

T

The parsed object of type T.

If the input string is not valid JSON.