We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hey there!
{} and [] should be a valid empty JSON object/array. Instead, it creates - parse error - unexpected end of input.
Example:
nlohmann::json j;
std::stringstream ss("{}");
ss >> j;
Greetings
The text was updated successfully, but these errors were encountered:
What version have you tried? I've tried both {} and [] and got expected result
#include <sstream> #include <iostream> #include "json.hpp" using namespace nlohmann; int main() { try { json j; std::stringstream ss("[]"); ss >> j; std::cout << "all good" << std::endl; } catch(std::exception&) { std::cout << "no luck" << std::endl; } }
Sorry, something went wrong.
There was a bug with too short inputs in 2.0.6. Please try 2.0.7, see https://github.com/nlohmann/json/releases/tag/v2.0.7
@SmoofBullet Did you try the 2.0.7 version?
Yes, i have tried the new version and the error disappeared. Thx!
No branches or pull requests
Hey there!
{} and [] should be a valid empty JSON object/array. Instead, it creates - parse error - unexpected end of input.
Example:
nlohmann::json j;
std::stringstream ss("{}");
ss >> j;
Greetings
The text was updated successfully, but these errors were encountered: