aboutsummaryrefslogtreecommitdiffstats
path: root/solc/CommandLineInterface.cpp
diff options
context:
space:
mode:
authorAli92hm <ali92hm@gmail.com>2017-05-23 04:39:38 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-09-13 04:50:22 +0800
commit1a9c503e93547fadc0a7a2dcd6d368f456f47460 (patch)
tree5b677e6689fb5ee567a15d6c40a82c95a33d9e58 /solc/CommandLineInterface.cpp
parent8bb96eaaf533b17cd9c9109642455408f551348c (diff)
downloaddexon-solidity-1a9c503e93547fadc0a7a2dcd6d368f456f47460.tar.gz
dexon-solidity-1a9c503e93547fadc0a7a2dcd6d368f456f47460.tar.zst
dexon-solidity-1a9c503e93547fadc0a7a2dcd6d368f456f47460.zip
Added createJson method to make writing json easier
Diffstat (limited to 'solc/CommandLineInterface.cpp')
-rw-r--r--solc/CommandLineInterface.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/solc/CommandLineInterface.cpp b/solc/CommandLineInterface.cpp
index e6d8776b..9367a71c 100644
--- a/solc/CommandLineInterface.cpp
+++ b/solc/CommandLineInterface.cpp
@@ -508,6 +508,11 @@ void CommandLineInterface::createFile(string const& _fileName, string const& _da
BOOST_THROW_EXCEPTION(FileError() << errinfo_comment("Could not write to file: " + pathName));
}
+void CommandLineInterface::createJson(string const& _fileName, Json::Value const& _json)
+{
+ createFile(boost::filesystem::basename(_fileName) + string(".json"), dev::jsonCompactPrint(_json));
+}
+
bool CommandLineInterface::parseArguments(int _argc, char** _argv)
{
// Declare the supported options.