Skip to content

Commit e3ba090

Browse files
authored
use ui json element instead of custom json parsing (#5216)
1 parent b5d5a7a commit e3ba090

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ironfish-cli/src/ui/table.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { Flags, ux } from '@oclif/core'
77
import chalk from 'chalk'
88
import { orderBy } from 'natural-orderby'
99
import stringWidth from 'string-width'
10+
import { json } from './json'
1011

1112
const WIDE_DASH = '─'
1213

@@ -157,7 +158,7 @@ class Table<T extends Record<string, unknown>> {
157158
}
158159

159160
renderJson(rows: Record<string, string>[]) {
160-
this.options.printLine(JSON.stringify(rows, null, 2))
161+
this.options.printLine(json(rows))
161162
}
162163

163164
renderTerminal(rows: Record<string, string>[]) {

0 commit comments

Comments
 (0)