Пример #1
0
const char* fromCString(const char* input, int length, int32* value)
{
	int64 val;
	const char* ret = fromCString(input, length, &val);
	*value = (int32)val;
	return ret;
}
Пример #2
0
void JsonSerializer::deserialize(int32& value, int32 default_value)
{
	if (m_is_string_token || !fromCString(m_token, m_token_size, &value))
	{
		value = default_value;
	}
	deserializeToken();
}
Пример #3
0
void JsonSerializer::deserializeArrayItem(int64& value, int64 default_value)
{
	deserializeArrayComma();
	if (m_is_string_token || !fromCString(m_token, m_token_size, &value))
	{
		value = default_value;
	}
	deserializeToken();
}
Пример #4
0
void JsonSerializer::deserialize(const char* label, int32& value, int32 default_value)
{
	deserializeLabel(label);
	if (m_is_string_token || !fromCString(m_token, m_token_size, &value))
	{
		value = default_value;
	}
	deserializeToken();
}