aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Json.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-01 08:07:36 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2024-05-01 08:07:36 +0200
commitd7345bbf71eefb20bc2fb15dbf6595314d65f860 (patch)
treeb5ce36ebb4daeff451ec66ed0314f61f5773c8e6 /lib/Json.cpp
parent60d791fee684aaa847b4987542b753b772b989ba (diff)
downloaddabmod-d7345bbf71eefb20bc2fb15dbf6595314d65f860.tar.gz
dabmod-d7345bbf71eefb20bc2fb15dbf6595314d65f860.tar.bz2
dabmod-d7345bbf71eefb20bc2fb15dbf6595314d65f860.zip
Handle int32 and int64 explicitly in Json
Diffstat (limited to 'lib/Json.cpp')
-rw-r--r--lib/Json.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/Json.cpp b/lib/Json.cpp
index 4dc2f25..361a149 100644
--- a/lib/Json.cpp
+++ b/lib/Json.cpp
@@ -84,11 +84,17 @@ namespace json {
else if (std::holds_alternative<double>(value.v)) {
ss << std::fixed << std::get<double>(value.v);
}
- else if (std::holds_alternative<ssize_t>(value.v)) {
- ss << std::get<ssize_t>(value.v);
+ else if (std::holds_alternative<uint64_t>(value.v)) {
+ ss << std::get<uint64_t>(value.v);
}
- else if (std::holds_alternative<size_t>(value.v)) {
- ss << std::get<size_t>(value.v);
+ else if (std::holds_alternative<int64_t>(value.v)) {
+ ss << std::get<int64_t>(value.v);
+ }
+ else if (std::holds_alternative<uint32_t>(value.v)) {
+ ss << std::get<uint32_t>(value.v);
+ }
+ else if (std::holds_alternative<int32_t>(value.v)) {
+ ss << std::get<int32_t>(value.v);
}
else if (std::holds_alternative<bool>(value.v)) {
ss << (std::get<bool>(value.v) ? "true" : "false");