mirror of
https://github.com/pantor/inja.git
synced 2026-05-07 05:25:22 +00:00
works with JSON_NO_IO
This commit is contained in:
@@ -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>());
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user