🐛 finally fixed Json type issues

This commit is contained in:
EntireTwix 2021-04-07 00:49:01 -07:00
parent be1ff5dc5c
commit 56bae9cf8a
2 changed files with 5 additions and 1 deletions

View file

@ -19,6 +19,10 @@ INLINE Json::Value JsonReturn(T &&val)
{
res["value"] = (int)val; //becuase of json lib interpreting 67 as 'A' for example
}
else if constexpr (std::is_same_v<T, long>)
{
res["value"] = (Json::UInt64)val;
}
else
{
res["value"] = val;

View file

@ -25,7 +25,7 @@ struct User
Json::Value Serialize() const
{
Json::Value res;
res["balance"] = balance;
res["balance"] = (Json::UInt)balance;
res["password"] = password;
return res;
}