Skip to content

Instantly share code, notes, and snippets.

@neodigm
Created April 6, 2024 17:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save neodigm/313016df4477adb115eef0a74744e7f6 to your computer and use it in GitHub Desktop.
Save neodigm/313016df4477adb115eef0a74744e7f6 to your computer and use it in GitHub Desktop.
Is it valid JSON test
isJSON( sIn ){
let isVal = false
try { isVal = typeof (JSON.parse( sIn )) } catch ( er ) { }
return ( isVal == "object" )
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment