gnunet-svn
[Top][All Lists]
Advanced

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

[taler-anastasis] branch master updated: implement truth_to_json


From: gnunet
Subject: [taler-anastasis] branch master updated: implement truth_to_json
Date: Fri, 19 Feb 2021 00:53:29 +0100

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

grothoff pushed a commit to branch master
in repository anastasis.

The following commit(s) were added to refs/heads/master by this push:
     new 1e3e0ab  implement truth_to_json
1e3e0ab is described below

commit 1e3e0ab32d695bd2efa4d499edb52d0e9bf3dc08
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Feb 19 00:51:51 2021 +0100

    implement truth_to_json
---
 src/lib/anastasis_backup.c | 21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/lib/anastasis_backup.c b/src/lib/anastasis_backup.c
index d22e938..ff4e6b9 100644
--- a/src/lib/anastasis_backup.c
+++ b/src/lib/anastasis_backup.c
@@ -98,8 +98,25 @@ ANASTASIS_truth_from_json (const json_t *json)
 json_t *
 ANASTASIS_truth_to_json (const struct ANASTASIS_Truth *t)
 {
-  GNUNET_break (0); // FIXME: implement!
-  return NULL;
+  return json_pack (
+    "{s:o,s:o,s:o,s:o"
+    ",s:s,s:s,s:s,s:s}",
+    "uuid",
+    GNUNET_JSON_from_data_auto (&t->uuid),
+    "key_share",
+    GNUNET_JSON_from_data_auto (&t->key_share),
+    "truth_key",
+    GNUNET_JSON_from_data_auto (&t->truth_key),
+    "salt",
+    GNUNET_JSON_from_data_auto (&t->salt),
+    "url",
+    json_string (t->url),
+    "method",
+    json_string (t->method),
+    "instructions",
+    json_string (t->instructions),
+    "mime_type",
+    json_string (t->mime_type));
 }
 
 

-- 
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]