Skip to content

Commit

Permalink
Actually generate JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
pitrou committed Jul 22, 2024
1 parent 6446721 commit f6862f9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/src/parquet/metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
#include "parquet/schema_internal.h"
#include "parquet/thrift_internal.h"

// Include this after thrift_internal.h
#include <thrift/protocol/TJSONProtocol.h>

namespace parquet {

const ApplicationVersion& ApplicationVersion::PARQUET_251_FIXED_VERSION() {
Expand Down Expand Up @@ -869,9 +872,7 @@ class FileMetaData::FileMetaDataImpl {
auto md = *metadata_;
if (scrub) Scrub(&md);
if (json) {
std::ostringstream ss;
md.printTo(ss);
return ss.str();
return apache::thrift::ThriftJSONString(md);
} else {
ThriftSerializer serializer;
std::string out;
Expand Down

0 comments on commit f6862f9

Please sign in to comment.