summaryrefslogtreecommitdiff
path: root/src/mint-lib/mint_api_json.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mint-lib/mint_api_json.h')
-rw-r--r--src/mint-lib/mint_api_json.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/src/mint-lib/mint_api_json.h b/src/mint-lib/mint_api_json.h
index ec3b63cbc..690192510 100644
--- a/src/mint-lib/mint_api_json.h
+++ b/src/mint-lib/mint_api_json.h
@@ -74,9 +74,9 @@ enum MAJ_Command
MAJ_CMD_EDDSA_SIGNATURE,
/**
- * Parse at current position.
+ * Parse `const char *` JSON string at current position.
*/
- MAJ_CMD_B,
+ MAJ_CMD_STRING,
/**
* Parse at current position.
@@ -176,6 +176,11 @@ struct MAJ_Specification
} eddsa_signature;
+ /**
+ * Where to store a pointer to the string.
+ */
+ const char **strptr;
+
} details;
};
@@ -230,6 +235,17 @@ MAJ_parse_free (struct MAJ_Specification *spec);
/**
+ * The expected field stores a string.
+ *
+ * @param name name of the JSON field
+ * @param strptr where to store a pointer to the field
+ */
+struct MAJ_Specification
+MAJ_spec_string (const char *name,
+ const char **strptr);
+
+
+/**
* Absolute time.
*
* @param name name of the JSON field