1
0
mirror of https://github.com/falk-werner/webfuse-provider synced 2024-10-27 20:44:10 +00:00
falk-werner_webfuse-provider/test/webfuse_provider/test_util/json_doc.cc

22 lines
367 B
C++
Raw Normal View History

2020-07-12 11:06:00 +00:00
#include "webfuse_provider/test_util/json_doc.hpp"
namespace webfuse_test
{
JsonDoc::JsonDoc(std::string const & json)
: contents(json)
{
doc = wfp_impl_json_doc_loadb(const_cast<char*>(contents.data()), json.size());
2020-07-12 11:06:00 +00:00
}
JsonDoc::~JsonDoc()
{
wfp_impl_json_doc_dispose(doc);
2020-07-12 11:06:00 +00:00
}
wfp_json const * JsonDoc::root()
{
return wfp_impl_json_doc_root(doc);
2020-07-12 11:06:00 +00:00
}
}