const char* fromCString(const char* input, int length, int32* value) { int64 val; const char* ret = fromCString(input, length, &val); *value = (int32)val; return ret; }
void JsonSerializer::deserialize(int32& value, int32 default_value) { if (m_is_string_token || !fromCString(m_token, m_token_size, &value)) { value = default_value; } deserializeToken(); }
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(); }
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(); }