gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libeufin] branch master updated: fix config show


From: gnunet
Subject: [libeufin] branch master updated: fix config show
Date: Thu, 19 May 2022 08:35:07 +0200

This is an automated email from the git hooks/post-receive script.

ms pushed a commit to branch master
in repository libeufin.

The following commit(s) were added to refs/heads/master by this push:
     new 20b0b31a fix config show
20b0b31a is described below

commit 20b0b31a3c2c0eec7c8ff81e7ede83bb942facd4
Author: ms <ms@taler.net>
AuthorDate: Thu May 19 08:35:02 2022 +0200

    fix config show
---
 sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt 
b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
index e255316d..df53a5d9 100644
--- a/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
+++ b/sandbox/src/main/kotlin/tech/libeufin/sandbox/Main.kt
@@ -40,6 +40,9 @@ import UtilError
 import com.fasterxml.jackson.core.JsonParseException
 import com.fasterxml.jackson.core.util.DefaultIndenter
 import com.fasterxml.jackson.core.util.DefaultPrettyPrinter
+import com.fasterxml.jackson.databind.ObjectMapper
+import com.fasterxml.jackson.databind.SerializationConfig
+import com.fasterxml.jackson.databind.SerializationFeature
 import com.fasterxml.jackson.databind.exc.MismatchedInputException
 import com.fasterxml.jackson.module.kotlin.KotlinModule
 import com.fasterxml.jackson.module.kotlin.MissingKotlinParameterException
@@ -165,15 +168,17 @@ class Config : CliktCommand(
                 val maybeDemobank = 
BankAccountEntity.find(BankAccountsTable.label eq "bank").firstOrNull()
                 if (showOption) {
                     if (maybeDemobank != null) {
+                        val ret = ObjectMapper()
+                        ret.configure(SerializationFeature.INDENT_OUTPUT, true)
                         println(
-                            object {
+                            ret.writeValueAsString(object {
                                 val currency = maybeDemobank.demoBank.currency
                                 val bankDebtLimit = 
maybeDemobank.demoBank.bankDebtLimit
                                 val usersDebtLimit = 
maybeDemobank.demoBank.usersDebtLimit
                                 val allowRegistrations = 
maybeDemobank.demoBank.allowRegistrations
                                 val name = maybeDemobank.demoBank.name // 
always 'default'
                                 val withSignupBonus = 
maybeDemobank.demoBank.withSignupBonus
-                            }
+                            })
                         )
                         return@transaction
                     }

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]