zoukankan      html  css  js  c++  java
  • alue of type java.lang.String cannot be converted to JSONObject

    1. /** 
    2.      * 4.0以下系统处理掉返回json的BOM头 
    3.      *  
    4.      * @param jsonStr 
    5.      * @return 
    6.      */  
    7.     public static String getJson(String jsonStr) {  
    8.         if (jsonStr != null && jsonStr.startsWith("ufeff")) {  
    9.             LogUtil.d(tag, "jsonstr.exist(utf-8.BOM),json="+jsonStr, BaseAppCommon.Isdebug);  
    10.             // jsonStr = jsonStr.substring(1);  
    11.             jsonStr = jsonStr.substring(jsonStr.indexOf("{"),  
    12.                     jsonStr.lastIndexOf("}") + 1);  
    13.         }  
    14.         return jsonStr;  
    15.     }  
  • 相关阅读:
    hdfs校验和
    hdfs读写策略
    hdfs架构
    hdfs数据块
    元数据
    集群的创建
    jQuery_DOM操作
    jQuery_简介_选择器
    Ajax
    MySQL整理_2_数据库操作
  • 原文地址:https://www.cnblogs.com/Free-Thinker/p/3468551.html
Copyright © 2011-2022 走看看