json: format output with 4-space indentation
Use `dump(4)` instead of `dump()` to generate JSON with
4-space indentation, improving readability of written files.
Change-Id: Ib0a0e932bba76091dbb6a6b89640e579df289747
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
diff --git a/user_channel/cipher_mgmt.cpp b/user_channel/cipher_mgmt.cpp
index c0c0ae1..01518c6 100644
--- a/user_channel/cipher_mgmt.cpp
+++ b/user_channel/cipher_mgmt.cpp
@@ -133,7 +133,7 @@
"FILE_NAME", tmpFile);
return -EIO;
}
- const auto& writeData = jsonData.dump();
+ const auto& writeData = jsonData.dump(4);
if (write(fd, writeData.c_str(), writeData.size()) !=
static_cast<ssize_t>(writeData.size()))
{