Convert protobuf values that are unsigned properly to uint in JSON (#2659)

This commit is contained in:
GUVWAF
2023-07-27 20:53:20 +02:00
committed by GitHub
parent 74650ca276
commit 32246850aa
3 changed files with 32 additions and 18 deletions

View File

@@ -363,6 +363,19 @@ JSONValue::JSONValue(int m_integer_value)
number_value = (double)m_integer_value;
}
/**
* Basic constructor for creating a JSON Value of type Number
*
* @access public
*
* @param uint m_integer_value The number to use as the value
*/
JSONValue::JSONValue(uint m_integer_value)
{
type = JSONType_Number;
number_value = (double)m_integer_value;
}
/**
* Basic constructor for creating a JSON Value of type Array
*
@@ -874,4 +887,4 @@ std::string JSONValue::Indent(size_t depth)
depth ? --depth : 0;
std::string indentStr(depth * indent_step, ' ');
return indentStr;
}
}