| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 125b206 commit b4c1cdb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -211,67 +211,6 @@ function isEmpty(s) { | |||
| 211 | 211 | ||
| 212 | 212 | ||
| 213 | 213 | ||
| 214 | - /**转为JSON对象 | ||
| 215 | - * @param s | ||
| 216 | - * @return {*} | ||
| 217 | - */ | ||
| 218 | - function parseObject(s) { | ||
| 219 | - if (s == null || s instanceof Object) { | ||
| 220 | - return s; | ||
| 221 | - } | ||
| 222 | - if (typeof s == 'string') { | ||
| 223 | - if (s.indexOf("'") >= 0) { | ||
| 224 | - s = s.replace(/'/g, "\'"); | ||
| 225 | - } | ||
| 226 | - return JSON.parse(s); | ||
| 227 | - } | ||
| 228 | - return parseObject(s.toString()); | ||
| 229 | - } | ||
| 230 | - | ||
| 231 | - // /**格式化JSON串 | ||
| 232 | - // * @param json | ||
| 233 | - // */ | ||
| 234 | - // function format(json) { | ||
| 235 | - // try { | ||
| 236 | - // return JSON.stringify(JSON.parse(json), null, "\t"); | ||
| 237 | - // } catch(e) { | ||
| 238 | - // log(TAG_REQUEST_UTIL, 'format try { ... } catch (err) { \n ' + err); | ||
| 239 | - // return json; | ||
| 240 | - // } | ||
| 241 | - // | ||
| 242 | - // // 导致格式化后代码很难看,像没格式化一样 | ||
| 243 | - // // if (json == null || json == '') { | ||
| 244 | - // // console.log('format json == null || json == "" >> return json;'); | ||
| 245 | - // // return json; | ||
| 246 | - // // } | ||
| 247 | - // // | ||
| 248 | - // // if (json instanceof Object) { //避免赋值影响传进来的json | ||
| 249 | - // // return JSON.stringify(json, null, "\t"); | ||
| 250 | - // // } | ||
| 251 | - // // | ||
| 252 | - // // var jsonObj; | ||
| 253 | - // // if (typeof json == 'string'){ | ||
| 254 | - // // try { | ||
| 255 | - // // jsonObj = JSON.parse(json); | ||
| 256 | - // // } catch (err) { | ||
| 257 | - // // console.log('format try { jsonObj = JSON.parse(json); } catch (err) { \n ' + err); | ||
| 258 | - // // return json; | ||
| 259 | - // // } | ||
| 260 | - // // } | ||
| 261 | - // // else { | ||
| 262 | - // // console.log('format json type error !'); | ||
| 263 | - // // return json; | ||
| 264 | - // // } | ||
| 265 | - // // return JSON.stringify(jsonObj, null, "\t"); | ||
| 266 | - // } | ||
| 267 | - | ||
| 268 | - function log(tag, msg) { | ||
| 269 | - console.log(tag + '.' + msg); | ||
| 270 | - } | ||
| 271 | - | ||
| 272 | - | ||
| 273 | - | ||
| 274 | - | ||
| 275 | 214 | ||
| 276 | 215 | //常用请求<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< | |
| 277 | 216 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments