-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Exception Unhandled out_of_range error #2197
Comments
I would need more information to diagnose this. What is the |
Same exception in Visual Studio 2019. The error occurred for me when trying to stream into the
Just like duojet2ezz, the raw text: |
Looks like it doesn't like copying and pasting text in the string in the json file... So when I type in my text it works.. but copying it from another document does not. It's going to be very time consuming to retype reams of text v just copying it to my json file. Is this a known issue and what additional information can I provide you with if it is not? Thanks for all the help!! |
Thad is odd. No, this is not a known issue. The library perfectly supports UTF-8 - maybe your editor adds some weird bytes or encoding when copy/pasting? Maybe you can attach a working and non-working file so we can look at the binary diff? |
Which files from my project would you like? Just the json... one working and one that does not work? UPDATE: I think I have narrowed down the problem. It seems the behavior occurs when copying and pasting an apostrophe UPDATE: And also consecutive periods in a row ..... UPDATE: Copying an apostrophe worked in another context... so now I really don't know. |
That sounds like your editor replaces some characters. Which editor do you use? About the file: Please attach a file that does work if you read it directly, but does not work after copy/pasting. |
Hello,
Thanks for this library and for answering questions!!
The library was working perfectly when I was working without an IDE. I just brought my files into visual studio and am getting the following error when trying to cout from my .json file:
Unhandled exception at 0x75754402 in Epic Disaster Story.exe: Microsoft C++ exception: nlohmann::detail::out_of_range at memory location 0x009CE6C0. occurred
It takes me to json_sax.hpp and shows the following code where the error occurred:
In my code this occurs when I try:
I believe the json file is formatted properly as I had no problems without the IDE...
The text was updated successfully, but these errors were encountered: