Home > sculp-js > isJsonString
isJsonString() function
判断一个字符串是否为有效的 JSON, 若有效则返回有效的JSON对象,否则false
Signature:
typescript
export declare function isJsonString(str: string): Object | boolean;Parameters
Parameter | Type | Description |
|---|---|---|
str | string |
Returns:
Object | boolean
{Object | boolean}