diff options
Diffstat (limited to 'libdevcore/JSON.cpp')
-rw-r--r-- | libdevcore/JSON.cpp | 8 |
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 |