콘텐츠로 이동

utils/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.

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.