JS判定データはJSONタイプですか?
492 ワード
var
isJson =
function
(obj){
var
isjson =
typeof
(obj) ==
"object"
&& Object.prototype.toString.call(obj).toLowerCase() ==
"[object object]"
&& !obj.length;
return
isjson;
}
転載先:https://www.cnblogs.com/toward-the-sun/p/4724604.html