(value)
| 1723 | } |
| 1724 | |
| 1725 | function unpackTopLevelEscapedJSON(value) { |
| 1726 | if (typeof value !== 'string' || !value.trim()) { |
| 1727 | return value; |
| 1728 | } |
| 1729 | |
| 1730 | try { |
| 1731 | const parsed = parseWithBigInt(value); |
| 1732 | if ( |
| 1733 | typeof parsed === 'object' && |
| 1734 | parsed !== null && |
| 1735 | (Array.isArray(parsed) || Object.prototype.toString.call(parsed) === '[object Object]') && |
| 1736 | !( |
| 1737 | parsed && |
| 1738 | typeof parsed.s === 'number' && |
| 1739 | typeof parsed.e === 'number' && |
| 1740 | Array.isArray(parsed.c) && |
| 1741 | Object.keys(parsed).length === 3 |
| 1742 | ) |
| 1743 | ) { |
| 1744 | return deepParseJSONStrings(parsed); |
| 1745 | } |
| 1746 | } catch (e) { |
| 1747 | // 保持原字符串,沿用旧行为 |
| 1748 | } |
| 1749 | |
| 1750 | return value; |
| 1751 | } |
| 1752 | |
| 1753 | |
| 1754 | function isInsideQuotedSegment(text, offset) { |
no test coverage detected