Export metadata as "regular" (non-simple) JSON

This makes the output independent from changes to identifiers
used in the thrift specification.
This commit is contained in:
Marcus Holland-Moritz 2021-04-01 00:38:43 +02:00
parent 3d5023ba39
commit ae9d521efc

View File

@ -127,7 +127,7 @@ int dwarfsck(int argc, char** argv) {
if (!export_metadata.empty()) {
auto of = folly::File(export_metadata, O_RDWR | O_CREAT | O_TRUNC);
filesystem_v2 fs(lgr, mm, fsopts);
auto json = fs.serialize_metadata_as_json(true);
auto json = fs.serialize_metadata_as_json(false);
if (folly::writeFull(of.fd(), json.data(), json.size()) < 0) {
LOG_ERROR << "failed to export metadata";
}