Reranko05 commented on code in PR #50781:
URL: https://github.com/apache/arrow/pull/50781#discussion_r3734165704
##########
cpp/src/parquet/types.cc:
##########
@@ -1785,13 +1782,9 @@ namespace {
void WriteCrsKeyAndValue(const std::string_view crs, std::ostream& json) {
// There is no restriction on the crs value here, and it may contain quotes
// or backslashes that would result in invalid JSON if unescaped.
- namespace rj = ::arrow::rapidjson;
- rj::StringBuffer buffer;
- rj::Writer<rj::StringBuffer> writer(buffer);
- rj::Value v;
- v.SetString(crs.data(), static_cast<int32_t>(crs.size()));
- v.Accept(writer);
- json << R"(, "crs": )" << buffer.GetString();
+ ::arrow::json::JsonWriter writer;
+ writer.String(crs);
+ json << R"(, "crs": )" << writer.GetString().ValueUnsafe();
Review Comment:
Created an issue for this. #50830
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]