2016-08-16 13:08:59 -07:00
|
|
|
#include "json_test_vectors.h"
|
|
|
|
|
2017-01-06 10:15:56 -08:00
|
|
|
UniValue
|
2016-08-16 13:08:59 -07:00
|
|
|
read_json(const std::string& jsondata)
|
|
|
|
{
|
2017-01-06 10:15:56 -08:00
|
|
|
UniValue v;
|
2016-08-16 13:08:59 -07:00
|
|
|
|
2017-01-06 10:15:56 -08:00
|
|
|
if (!(v.read(jsondata) && v.isArray()))
|
2016-08-16 13:08:59 -07:00
|
|
|
{
|
|
|
|
ADD_FAILURE();
|
2017-01-06 10:15:56 -08:00
|
|
|
return UniValue(UniValue::VARR);
|
2016-08-16 13:08:59 -07:00
|
|
|
}
|
|
|
|
return v.get_array();
|
|
|
|
}
|