summaryrefslogtreecommitdiffstats
path: root/src/json.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/json.c')
-rw-r--r--src/json.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/json.c b/src/json.c
index 078dfb7..c9c2078 100644
--- a/src/json.c
+++ b/src/json.c
@@ -18,6 +18,15 @@ int og_json_parse_string(json_t *element, const char **str)
return 0;
}
+int og_json_parse_uint64(json_t *element, uint64_t *integer)
+{
+ if (json_typeof(element) != JSON_INTEGER)
+ return -1;
+
+ *integer = json_integer_value(element);
+ return 0;
+}
+
int og_json_parse_uint(json_t *element, uint32_t *integer)
{
if (json_typeof(element) != JSON_INTEGER)