-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
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
Crash when parse big jsonfile #2042
Comments
Are you sure it is exactly that file? The parser error states that there was a |
o...,maybe I made a mistake, I passed the file path to it, like this: when I follow the example code, It works very well. so It can only pass the file content to it ? |
This function expects a string to parse, not a path to some file. |
You can pass an |
@oskycar Do you need further assistance? |
thank you very much. I had no more questions. |
we can close this issue. Thanks for your attention. |
What is the issue you have?
I had gened a 5.8M json file. when I parse it use nlohmann/json, it crashed!.
Please describe the steps to reproduce the issue. Can you provide a small but working code example?
nlohmann::json jobj = nlohmann::json::parse(file);
Which compiler and operating system are you using? Is it a supported compiler?
MacOS 10.15.3, Use Xcode 11.3.1
Did you use a released version of the library or the version from the
develop
branch?use released version 3.6.1, I also tried latesed version 3.7.3, it crashed too.
If you experience a compilation error: can you compile and run the unit tests?
the output error message:
libc++abi.dylib: terminating with uncaught exception of type nlohmann::detail::parse_error: [json.exception.parse_error.101] parse error at line 1, column 1: syntax error while parsing value - invalid literal; last read: '/'
I had upload the json file url: https://www.dropbox.com/s/5wsfcd6p06jeckk/out.json?dl=0
The text was updated successfully, but these errors were encountered: