anhero / JsonBox

This is a JSON C++ library. It can write and read JSON files with ease and speed.
MIT License
112 stars 60 forks source link

Different behavior when compiled with Visual Studio 2015 #35

Open mbabuskov opened 9 years ago

mbabuskov commented 9 years ago

Hi,

I have a JSON file that is created using JsonBox. It is loading fine with gcc using MinGW and also with Apple C++ compiler (LLVM 6.0). However, when I try with 32bit Microsoft Compiler from Visual Studio Express 2015 JsonBox shows errors like it's expecting a string to end, but it reads in some other character instead. And because of this it does not load in the whole file. More interesting, in some files I tried it reports characters that are not even in the file (the file is pure ASCII). Here is the file:

http://guacosoft.com/chp.json

I tried changing the indentation and quoting settings but it did not help.

samueldr commented 9 years ago

Can you reproduce the issue:

I mean, making a one-file C++ program that opens your json file, parses it, does the least amount of stuff, then exits. If this program exhibits the same issue, continue by reducing your data. Reduce your biggest array to one member element only. If it still exhibits the issue, it will be easier to debug.

Might be nice, too, to try to isolate which part of the JSON file seems to cause breakage.

I personally have no real experience with using Visual Studio (I don't even have a machine or VM on hand with it). I might look into it when time allows, but having repro code would help greatly.