Files
dragonx/src/gtest/json_test_vectors.cpp
2024-02-27 23:59:59 +01:00

18 lines
428 B
C++

// Copyright (c) 2016-2024 The Hush developers
// Distributed under the GPLv3 software license, see the accompanying
// file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html
#include "json_test_vectors.h"
UniValue
read_json(const std::string& jsondata)
{
UniValue v;
if (!(v.read(jsondata) && v.isArray()))
{
ADD_FAILURE();
return UniValue(UniValue::VARR);
}
return v.get_array();
}