works with JSON_NO_IO

This commit is contained in:
pantor
2021-11-17 10:39:53 +01:00
parent dc3451173f
commit ab6d006443
4 changed files with 8 additions and 8 deletions
+2 -3
View File
@@ -165,9 +165,8 @@ public:
if (file.fail()) {
INJA_THROW(FileError("failed accessing file at '" + input_path + filename + "'"));
}
json j;
file >> j;
return j;
return json::parse(std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>());
}
/*!
+1 -1
View File
@@ -458,7 +458,7 @@ class Renderer : public NodeVisitor {
if (value.is_string()) {
os << value.get<std::string>(); // otherwise the value is surrounded with ""
} else {
os << value;
os << value.dump();
}
sep = separator;
}