aboutsummaryrefslogtreecommitdiffstats
path: root/libdevcore/JSON.cpp
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-11-23 19:23:27 +0800
committerGitHub <noreply@github.com>2018-11-23 19:23:27 +0800
commit616ef8bca8515d565cd9ce24329056c0828e6853 (patch)
tree03a8798bca8f2ef221d77fc8a4c6c5390105800c /libdevcore/JSON.cpp
parent9217fbb58d085325ce37ed6ca37f76e8b8de9d90 (diff)
parent0ff4cbe51ba653397a1937c8c08b3d09541492ef (diff)
downloaddexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar.gz
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar.bz2
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar.lz
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar.xz
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.tar.zst
dexon-solidity-616ef8bca8515d565cd9ce24329056c0828e6853.zip
Merge pull request #3073 from ethereum/smtlib2_via_standardio
Inject SMTLIB2 queries and responses via standard-json-io.
Diffstat (limited to 'libdevcore/JSON.cpp')
-rw-r--r--libdevcore/JSON.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libdevcore/JSON.cpp b/libdevcore/JSON.cpp
index 6317cc89..086fae50 100644
--- a/libdevcore/JSON.cpp
+++ b/libdevcore/JSON.cpp
@@ -21,6 +21,8 @@
#include "JSON.h"
+#include "CommonIO.h"
+
#include <sstream>
#include <map>
#include <memory>
@@ -111,4 +113,10 @@ bool jsonParse(string const& _input, Json::Value& _json, string *_errs /* = null
return parse(readerBuilder, _input, _json, _errs);
}
+bool jsonParseFile(string const& _fileName, Json::Value& _json, string *_errs /* = nullptr */)
+{
+ return jsonParse(readFileAsString(_fileName), _json, _errs);
+}
+
+
} // namespace dev