5 #include "boost/algorithm/string.hpp"
10 Json::Reader json_reader;
13 json_reader.parse(input, js);
19 Json::Reader reader(Json::Features::all());
20 reader.parse(str, js);
25 if (!a.isObject() || !b.isObject())
return;
26 for (
auto const& key : b.getMemberNames()) {
27 if (a[key].isObject()) {
36 Json::Value res(Json::objectValue);
38 for (
int i = 1; i < argc; ++i) {
39 if (boost::algorithm::iends_with(argv[i],
".json")) {
51 Json::Value
MergedJson(std::vector<std::string>
const& vec) {
52 Json::Value res(Json::objectValue);
53 for (
auto const& str : vec) {
54 if (boost::algorithm::iends_with(str,
".json")) {
Json::Value ExtractJsonFromString(std::string const &str)
Extracts a Json::Value from the given input string.
void UpdateJson(Json::Value &a, Json::Value const &b)
Updates the values in one json from the values in another.
Json::Value MergedJson(int argc, char *argv[])
Create a single merged Json::Value from a mixture of json files and json-formatted strings.
Json::Value ExtractJsonFromFile(std::string const &file)
Extracts a Json::Value from the specified input file.