MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / isJSONString

Method isJSONString

ruilanCar.js:326–337  ·  view source on GitHub ↗
(str)

Source from the content-addressed store, hash-verified

324 return params;
325 }
326 isJSONString(str) {
327 try {
328 var obj = JSON.parse(str);
329 if (typeof obj == 'object' && obj) {
330 return true;
331 } else {
332 return false;
333 }
334 } catch (e) {
335 return false;
336 }
337 }
338 isJson(obj) {
339 var isjson = typeof (obj) == "object" && Object.prototype.toString.call(obj).toLowerCase() == "[object object]" && !obj.length;
340 return isjson;

Callers 1

httpRequestMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected