mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-22 18:52:30 +00:00
Convert protobuf values that are unsigned properly to uint in JSON (#2659)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user