fixed: using size() when serializing strings - this allows to serialize a string which contain a null character
fixed: printing null character in space format: \u0000 (before was \0 which is not correct in json) fixed: in serialize_string_buffer(const char * input_str, ...) a temporary fixed was used when copying input string added support for surrogate pairs when reading \uHHHH format added support to parse \u{H...} format (only if parsing Space format)
This commit is contained in:
@@ -953,7 +953,7 @@ std::string Space::to_str() const
|
||||
if( type == type_wstring )
|
||||
{
|
||||
TextStream stream;
|
||||
serialize_string_buffer(value.value_wstring.c_str(), stream, Escape::no_escape);
|
||||
serialize_string_buffer(value.value_wstring.c_str(), value.value_wstring.size(), stream, Escape::no_escape);
|
||||
stream.to_string(str);
|
||||
return str;
|
||||
}
|
||||
|
Reference in New Issue
Block a user