JSON Check if JSON string is valid const isValidJSON = (value: string) => { try { JSON.parse(value); return true; } catch (error) { return false; } }