flavio / qjson

QJson is a qt-based library that maps JSON data to QVariant objects.
http://qjson.sourceforge.net
GNU Lesser General Public License v2.1
288 stars 140 forks source link

Switch from native locale handling to QLocale #44

Closed svuorela closed 10 years ago

svuorela commented 10 years ago

This ensures building on platforms where Qt is supported, rather than just work on linux/gcc and msvc. Notably, mingw also works now.

This fixes issue 32 and 33.

Performance wise, QLocale is slightly slower, but for a 10mb json file with a good mix of objects, arrays, doubles, integers and strings, the timings was around 975 msec for using 'native locales' and 980 msec for using QLocale. It was reproducibly approximately 5 msec slower for a 10mb file.

Note that the json_scanner.cc needs to be regenerated. I don't have the same flex version, so the diff in that file was quite large.

flavio commented 10 years ago

Thanks for your contribution!