mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add new JSON API for better abstraction and for supporting strict JSON parsing
This commit is contained in:
committed by
Alex Beregszaszi
parent
dcc4083b23
commit
0f29ac4e56
@@ -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(...)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user