Skip to content

Commit

Permalink
Replace deprecated writing routine.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelonken committed Dec 7, 2023
1 parent 3614ed3 commit 107c359
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions libsrc/JSONSegmentationMetaInformationHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,11 @@ namespace dcmqi {

data["segmentAttributes"] = createAndGetSegmentAttributesJSON();

Json::StyledWriter styledWriter;
ss << styledWriter.write(data);
Json::StreamWriterBuilder builder;
builder["commentStyle"] = "None";
builder["indentation"] = " ";
std::unique_ptr<Json::StreamWriter> writer( builder.newStreamWriter() );
writer->write(data, &ss);

return ss.str();
}
Expand Down

0 comments on commit 107c359

Please sign in to comment.