(el)
| 565 | * @returns {string} |
| 566 | */ |
| 567 | let getJsonText = function (el) { |
| 568 | |
| 569 | let txt = el.text().replace(/复制\|下载\|删除/gm,'').replace(/":\s/gm, '":').replace(/,$/, '').trim(); |
| 570 | if (!(/^{/.test(txt) && /\}$/.test(txt)) && !(/^\[/.test(txt) && /\]$/.test(txt))) { |
| 571 | txt = '{' + txt + '}'; |
| 572 | } |
| 573 | try { |
| 574 | txt = JSON.stringify(JSON.parse(txt), null, 4); |
| 575 | } catch (err) { |
| 576 | } |
| 577 | |
| 578 | return txt; |
| 579 | }; |
| 580 | |
| 581 | let _getJsonPathKeys = function (curEl) { |
| 582 | let keys = []; |
no test coverage detected