mirror of
https://github.com/Expand-sys/CCash
synced 2026-03-22 20:47:10 +11:00
🐛 finally fixed Json type issues
This commit is contained in:
parent
be1ff5dc5c
commit
56bae9cf8a
2 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,10 @@ INLINE Json::Value JsonReturn(T &&val)
|
||||||
{
|
{
|
||||||
res["value"] = (int)val; //becuase of json lib interpreting 67 as 'A' for example
|
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
|
else
|
||||||
{
|
{
|
||||||
res["value"] = val;
|
res["value"] = val;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ struct User
|
||||||
Json::Value Serialize() const
|
Json::Value Serialize() const
|
||||||
{
|
{
|
||||||
Json::Value res;
|
Json::Value res;
|
||||||
res["balance"] = balance;
|
res["balance"] = (Json::UInt)balance;
|
||||||
res["password"] = password;
|
res["password"] = password;
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue