Skip to content

Home > @jview/utils > isJSONString

isJSONString() function

是否是JSON字符串,空字符串也认为是合法的

Signature:

typescript
export declare function isJSONString(val: string): boolean;
export declare function isJSONString(val: string): boolean;

Parameters

ParameterTypeDescription
valstring

Returns:

boolean