From 42545dc1c7dc3f67a5487d709710a0685854a4a6 Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Fri, 9 Feb 2018 13:19:43 +0100 Subject: [PATCH] fix(dag): print data in a readable way if it is JSON If a dag node is JSON, print the stringified version of it, so that it shows the actual JSON and not just `[object Object]`. --- src/cli/commands/dag/get.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/commands/dag/get.js b/src/cli/commands/dag/get.js index 957185c59c..6088d2eb34 100644 --- a/src/cli/commands/dag/get.js +++ b/src/cli/commands/dag/get.js @@ -42,7 +42,7 @@ module.exports = { if (node._json) { delete node._json.multihash node._json.data = '0x' + node._json.data.toString('hex') - print(node._json) + print(JSON.stringify(node._json)) return }