TARAXA
jsoncpp.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <json/json.h>
4 
5 #include <string_view>
6 
7 namespace taraxa::util {
8 
9 Json::Value parse_json(std::string_view const& str);
10 std::string to_string(Json::Value const& json, bool no_indent = true);
11 
12 void writeJsonToFile(const std::string& file_name, const Json::Value& json);
13 Json::Value readJsonFromFile(const std::string& file_name);
14 Json::Value readJsonFromString(std::string_view str);
15 
16 } // namespace taraxa::util
Definition: default_construct_copyable_movable.hpp:10
std::string to_string(Json::Value const &json, bool no_indent=true)
Definition: jsoncpp.cpp:27
void writeJsonToFile(const std::string &file_name, const Json::Value &json)
Definition: jsoncpp.cpp:36
Json::Value parse_json(std::string_view const &str)
Definition: jsoncpp.cpp:15
Json::Value readJsonFromString(std::string_view str)
Definition: jsoncpp.cpp:62
Json::Value readJsonFromFile(const std::string &file_name)
Definition: jsoncpp.cpp:50