-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Parse throwing errors #1149
Comments
this is with latest dev version |
When you pass |
but it works if I run the same in tester loader, and couple days ago you told me that I should parse wstring for it to be accepted by json constructor. Is Parse just for parsing valid json in string format then? What about iterator parse, how does that work? I'm a little confused. How should I go about constructing a json when my data is in std::wstring |
std::wstring my_string = "...";
json j;
j["key"] = my_string; // <--- this does not work |
I swear that worked for me before, but now I can reproduce it. |
The library uses UTF-8 internally. Storing |
As the original problem is solved, can I close this issue? |
I've solved it by converting wstring to utf8 string, so in a way its solved I suppose |
So parse seem to work fine, if I load dll from my tester project, everything works fine, if I load exactly same dll with same data through windows services I get lots of errors like "Unhandled exception at 0x75000132 in xxxxxxx.exe: Microsoft C++ exception: nlohmann::detail::parse_error at memory location 0x0293A868. occurred"
This is triggered by
at line 3624 of json.hpp, I am using hardcoded data defined right in dll at this moment, to rule out any memory issues, but it's not helping. It just dies when it's trying to parse std::wstring.
called by
I've really got no clue what's causing it, apart that DLL with parsing code is being loaded by a different project that runs under windows service its exactly the same.
The text was updated successfully, but these errors were encountered: