From 0ff4cbe51ba653397a1937c8c08b3d09541492ef Mon Sep 17 00:00:00 2001 From: Leonardo Alt Date: Thu, 15 Nov 2018 16:47:52 +0100 Subject: Add SMTChecker tests for standard JSON --- libdevcore/JSON.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libdevcore/JSON.cpp') 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 #include #include @@ -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 -- cgit