SketchBookkeeper
6/13/2018 - 9:42 PM

IsJson

Check if string can be parsed to an Object.

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