Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

if json valide js

function IsJsonString(str) {
    try {
        JSON.parse(str);
    } catch (e) {
        return false;
    }
    return true;
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: execute JS code after pressing space bar 
Javascript :: vue router 404 page 
Javascript :: javascript zero pad 
Javascript :: find all images without alternate text 
Javascript :: javascript get form data as json 
Javascript :: find email domain javascript 
Javascript :: next router push state 
Javascript :: last item in object javascript 
Javascript :: js remove first and last element from array 
Javascript :: inarray javascript 
Javascript :: scroll to div jquery 
Javascript :: mock window jest js 
Javascript :: how to get values from select multiple in js 
Javascript :: scrollto jquery 
Javascript :: get element by tag name 
Javascript :: jquery datatables get selected row data 
Javascript :: back button js 
Javascript :: jquery get multiple input values by name 
Javascript :: js console.log color 
Javascript :: jquery change text color 
Javascript :: jquery if radio button is checked 
Javascript :: jquery validate conditional 
Javascript :: pipe of date angular 
Javascript :: JS DOM how to add a class name to any HTML element 
Javascript :: angular window object 
Javascript :: jquery unbind event 
Javascript :: clear arrays in jquery 
Javascript :: javascript send post 
Javascript :: $(getJson) returning error 
Javascript :: shadow in react native 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =