-
code: std::ifstream ifs(filename.data(), std::ifstream::in);
if (!json::accept(ifs)) {
log->critical("error file {} not valid config.", filename);
std::exit(EXIT_FAILURE);
}
js = nlohmann::json::parse(ifs);
log->debug("{}", js.dump()); expected: actual: working: std::ifstream ifs(filename.data(), std::ifstream::in);
if (!json::accept(ifs)) {
log->critical("error file {} not valid config.", filename);
std::exit(EXIT_FAILURE);
}
ifs.seekg(0); // add this
js = nlohmann::json::parse(ifs);
log->debug("{}", js.dump());
question: thanks |
Beta Was this translation helpful? Give feedback.
Answered by
nlohmann
Feb 1, 2024
Replies: 1 comment 1 reply
-
Yes, this is intentional:
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
nlohmann
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yes, this is intentional: