MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / isJSONString

Method isJSONString

jlld.js:375–386  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

373 .join('&');
374 }
375 isJSONString(str) {
376 try {
377 var obj = JSON.parse(str);
378 if (typeof obj == 'object' && obj) {
379 return true;
380 } else {
381 return false;
382 }
383 } catch (e) {
384 return false;
385 }
386 }
387 isJson(obj) {
388 var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length;
389 return isjson;

Callers 1

httpRequestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected