mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-02-23 22:56:52 +01:00
Make cli pretty print json (#2130)
This commit is contained in:
parent
e75b4ff4c9
commit
ef996adccf
2 changed files with 3 additions and 3 deletions
|
@ -26,7 +26,7 @@ import org.bitcoins.crypto.{
|
|||
Sha256DigestBE
|
||||
}
|
||||
import scopt.OParser
|
||||
import ujson.{Num, Str}
|
||||
import ujson._
|
||||
import upickle.{default => up}
|
||||
|
||||
import scala.collection.mutable
|
||||
|
@ -1340,7 +1340,7 @@ object ConsoleCli {
|
|||
case Str(string) => string
|
||||
case Num(num) if num.isWhole => num.toLong.toString
|
||||
case Num(num) => num.toString
|
||||
case rest: ujson.Value => rest.toString()
|
||||
case rest: ujson.Value => rest.render(2)
|
||||
}
|
||||
|
||||
(getKey("result"), getKey("error")) match {
|
||||
|
|
|
@ -33,7 +33,7 @@ case class OracleRoutes(oracle: DLCOracle)(implicit system: ActorSystem)
|
|||
val nonceStrs = eventDbs.map(_.nonce.hex)
|
||||
val json = Arr.from(nonceStrs)
|
||||
|
||||
Server.httpSuccess(json.render(indent = 2))
|
||||
Server.httpSuccess(json)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue