(json: string, options?: ParseOptions)
| 37 | } |
| 38 | |
| 39 | function prettyFormatWithFallback(json: string, options?: ParseOptions): string { |
| 40 | const tree = parseJSON(json); |
| 41 | return tree.valid() ? tree.stringify({ format: true }) : textFormat(json, options); |
| 42 | } |
| 43 | |
| 44 | /** |
| 45 | * Finds all top-level, valid JSON objects or arrays within a string. |
no test coverage detected