utils/jsonParse
Esta página aún no está disponible en tu idioma.
Functions
Section titled “Functions”jsonParse()
Section titled “jsonParse()”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.
Type Parameters
Section titled “Type Parameters”T
extends object
The expected type of the parsed object.
Parameters
Section titled “Parameters”string
The JSON string to parse.
Returns
Section titled “Returns”T
The parsed object of type T
.
Throws
Section titled “Throws”If the input string is not valid JSON.