pitrou commented on code in PR #51014:
URL: https://github.com/apache/arrow/pull/51014#discussion_r3951830873


##########
cpp/src/arrow/json/test_common.h:
##########
@@ -258,14 +261,26 @@ inline static Status ParseFromString(ParseOptions 
options, string_view src_str,
 }
 
 static inline std::string PrettyPrint(string_view one_line) {
-  rj::Document document;
+  simdjson::ondemand::parser parser;
 
   // Must pass size to avoid ASAN issues.
-  document.Parse(one_line.data(), one_line.size());
-  rj::StringBuffer sb;
-  rj::PrettyWriter<rj::StringBuffer> writer(sb);
-  document.Accept(writer);
-  return sb.GetString();
+  simdjson::padded_string json(one_line.data(), one_line.size());

Review Comment:
   > or should `PrettyPrint()` simply use `fractured_json_string()` and we 
remove the custom formatter?
   
   If `fractured_json_string` is good enough for our use case(s), then let's do 
just that ?



-- 
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]

Reply via email to