mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Added createJson method to make writing json easier
This commit is contained in:
committed by
Alex Beregszaszi
parent
8bb96eaaf5
commit
1a9c503e93
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user