Skip to main content

Try this.This This one is written in typescript.

 export function safeJsonParse(str: string) {   try {   return JSON.parse(str);   } catch (e) {   return str;   }  } 

Try this.This one is written in typescript.

 export function safeJsonParse(str: string) {   try {   return JSON.parse(str);   } catch (e) {   return str;   }  } 

Try this. This one is written in typescript.

export function safeJsonParse(str: string) { try { return JSON.parse(str); } catch (e) { return str; } } 
Source Link

Try this.This one is written in typescript.

 export function safeJsonParse(str: string) { try { return JSON.parse(str); } catch (e) { return str; } }