src/util/object.util.ts
Methods |
|
Static isJSON | ||||
isJSON(input)
|
||||
Defined in src/util/object.util.ts:3
|
||||
Parameters :
Returns :
boolean
|
export class ObjectUtil {
public static isJSON(input): boolean {
try {
JSON.parse(input);
return true;
} catch (e) {
return false;
}
}
}