Skip to content

Commit f170072

Browse files
committed
Allow print pretty-json for multiple entities
1 parent 9d79314 commit f170072

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

src/main/scala/gallia/heads/HeadsOut.scala

+4-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ trait HeadZOut { ignored: HeadZ =>
101101
// ---------------------------------------------------------------------------
102102
def printString () = { printJsonLines }
103103

104-
def printJsonl () = { printJsonLines }
105-
def printJsonLines() = { write(_.stdout.jsonLines); () }
106-
def printJsonArray() = { write(_.stdout.jsonArray); () }
104+
def printJsonl () = { printJsonLines }
105+
def printJsonLines () = { write(_.stdout.jsonLines) ; () }
106+
def printJsonArray () = { write(_.stdout.jsonArray) ; () }
107+
def printPrettyJsons() = { write(_.stdout.prettyJsons); () }
107108

108109
// ---------------------------------------------------------------------------
109110
def printTable() = { write(_.stdout.tsv); () }

src/main/scala/gallia/io/out/WriteFluency.scala

+4-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,10 @@ class OtherFluencyU(outlet: OutletType) extends EndWriteUFluency {
8383
// TODO: t210104111151 - offer to write JSON array as one-liner (though we want to discourage its use)?
8484
def jsonl = jsonLines
8585

86-
def jsonLines = endOtherZ(IoTypeZ.JsonLines, outlet)
87-
def jsonArray = endOtherZ(IoTypeZ.JsonArray, outlet)
86+
def jsonLines = endOtherZ(IoTypeZ.JsonLines, outlet)
87+
def jsonArray = endOtherZ(IoTypeZ.JsonArray, outlet)
88+
89+
def prettyJsons = endOtherZ(IoTypeZ.JsonPrettyLines, outlet)
8890

8991
// ---------------------------------------------------------------------------
9092
def table(sep: Char): OtherTableFluency = new OtherTableFluency(OtherTableConf(outlet).sep(sep))

0 commit comments

Comments
 (0)