Use GNU printf format
[oweals/gnunet.git] / src / include / gnunet_json_lib.h
index 8b21c01dd54aff8574bd3f5f7efd4723b5f8a365..9e5f9e28486fe19dce48d77bb75905ca337ff268 100644 (file)
@@ -311,6 +311,16 @@ GNUNET_JSON_from_data (const void *data,
                        size_t size);
 
 
+/**
+ * Convert binary data to a JSON string with the base32crockford
+ * encoding.
+ *
+ * @param ptr binary data, sizeof (*ptr) must yield correct size
+ * @return json string that encodes @a data
+ */
+#define GNUNET_JSON_from_data_auto(ptr) GNUNET_JSON_from_data(ptr, sizeof (*ptr))
+
+
 /**
  * Convert absolute timestamp to a json string.
  *