Commit d7116ea3 authored by zhujiashun's avatar zhujiashun

Add length info when serialize stringbuffer to string

parent cd3711f5
......@@ -172,7 +172,7 @@ int ParseFetchsResult(const butil::IOBuf& buf,
BUTIL_RAPIDJSON_NAMESPACE::StringBuffer buffer;
BUTIL_RAPIDJSON_NAMESPACE::Writer<BUTIL_RAPIDJSON_NAMESPACE::StringBuffer> writer(buffer);
itr_metadata->value.Accept(writer);
metadata = buffer.GetString();
metadata.assign(buffer.GetString(), buffer.GetSize());
}
auto itr = instances[i].FindMember("addrs");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment