function isJSON(str) {
if (typeof str == 'string') {
try {
var obj=JSON.parse(str);
if(typeof obj == 'object' && obj ){
return true;
}else{
return false;
} } catch(e) {
console.log('error:'+str+'!!!'+e);
return false;
}
}
console.log('It is not a string!')
}

最新文章

  1. 随笔jade
  2. 权重轮询调度算法(WeightedRound-RobinScheduling)-Java实现2
  3. GPS部标平台的架构设计(二) 可扩展性设计
  4. HDU1502/Luogu1352/UVa1220 party[树形DP]
  5. thrift之TTransport层的分帧传输类TFramedTransport
  6. java 日期格式转换EEE MMM dd HH:mm:ss z yyyy
  7. 一个UUID生成算法的C语言实现 --- WIN32版本 .
  8. Zookeeper运维经验
  9. How to: Signing Installers You Create with Inno Setup
  10. Unity 图片分割将spirte保存在本地
  11. TelephonyManager
  12. Request processing failed; nested exception is org.springframework.dao.InvalidDataAccessApiUsageException: Multiple representations of the same entity解决方法
  13. Openjudge-NOI题库-Pell数列
  14. 计算机学院大学生程序设计竞赛(2015’12) 1004 Happy Value
  15. Android--多线程之Handler 前言
  16. NDK各个版本链接
  17. netty源码分析
  18. /etc/fstab文件出错,无法进入Linux系统
  19. IBM developer:Kafka ACLs
  20. springboot接口返回封装与异常控制

热门文章

  1. 设计模式之装饰模式(iOS开发,代码用Objective-C展示)
  2. C# 跳转新页面
  3. mac OS X中升级php5.5至php5.6 or php7
  4. [note]Why I haven’t quit my corporate job (yet)
  5. How to Use updateConstraints(什么时候该使用updateConstraints)
  6. mac键盘图表大全
  7. GridView Print and Print Preview
  8. USB2.0学习笔记连载(十九):EZ-USB TRM手册重要部分介绍
  9. 相似变换 SimilarityTransform 以及skimage源码
  10. Spring面试,IoC和AOP的理解