(json)
| 1290 | * @private |
| 1291 | */ |
| 1292 | let _getAllKeysCount = function (json) { |
| 1293 | let count = 0; |
| 1294 | |
| 1295 | if (typeof json === 'object') { |
| 1296 | let keys = Object.keys(json); |
| 1297 | count += keys.length; |
| 1298 | |
| 1299 | keys.forEach(key => { |
| 1300 | if (json[key] && typeof json[key] === 'object') { |
| 1301 | count += _getAllKeysCount(json[key]); |
| 1302 | } |
| 1303 | }); |
| 1304 | } |
| 1305 | |
| 1306 | return count; |
| 1307 | }; |
| 1308 | |
| 1309 | // 用新的options来覆盖默认options |
| 1310 | let _extendsOptions = options => { |