diff options
author | Alexander Arlt <alexander.arlt@arlt-labs.com> | 2018-02-07 09:05:20 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-21 04:58:26 +0800 |
commit | 0f29ac4e563f60be781b31ed9ef2693e1a19dcc8 (patch) | |
tree | 888d535ad5698b41f6979622040c3dcce3d300ca /libsolidity | |
parent | dcc4083b231e3574a64b5b2a329a7401677610da (diff) | |
download | dexon-solidity-0f29ac4e563f60be781b31ed9ef2693e1a19dcc8.tar.gz dexon-solidity-0f29ac4e563f60be781b31ed9ef2693e1a19dcc8.tar.zst dexon-solidity-0f29ac4e563f60be781b31ed9ef2693e1a19dcc8.zip |
Add new JSON API for better abstraction and for supporting strict JSON parsing
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/interface/StandardCompiler.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libsolidity/interface/StandardCompiler.cpp b/libsolidity/interface/StandardCompiler.cpp index 84dedfb8..fb973d51 100644 --- a/libsolidity/interface/StandardCompiler.cpp +++ b/libsolidity/interface/StandardCompiler.cpp @@ -554,12 +554,11 @@ Json::Value StandardCompiler::compile(Json::Value const& _input) string StandardCompiler::compile(string const& _input) { Json::Value input; - Json::Reader reader; - + string errors; try { - if (!reader.parse(_input, input, false)) - return jsonCompactPrint(formatFatalError("JSONError", reader.getFormattedErrorMessages())); + if (!jsonParseStrict(_input, input, &errors)) + return jsonCompactPrint(formatFatalError("JSONError", errors)); } catch(...) { |