You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the parser assumes if a '' is before a double quote, the double quote isn't the end of the string.
Note that there are more complicated cases like this (and their expansion) which need to be handled properly which probably will take more code to support properly: ("\"", "\") of arbitrary length. A reverse search which checks if the number of '' preceding the quote is even or odd would do it: https://github.com/nlohmann/json/blob/master/src/json.cc#L2050
Performance in backslash-heavy strings may suffer a lot though. Might be better to do a pure forward scan of the string counting backslashes as you go (Lots of memory access, but it should all be prefetched + L1 cached by current x86, x64 CPUs).
Activity
Merge pull request #18 from Teemperor/fix_quote_escaping
cmaloney commentedon Jan 10, 2015
Thanks for fixing this!
Merge pull request nlohmann#17 from nlohmann/develop
fix: spawn model method (nlohmann#17)
Add json testsuite reference (#17)
Update 4 trustable tenets (#9)
Resolve code scanning alerts (#13)