Hello,
I found the fellowing bug which is currently putting my project on hold (i use a ton of JSON queries)... if you load the dictionary with this fellowing JSON (a JSON with boolean values)
{"c2dictionary":true,"data":{ "TestWithBoolean":true, "TestWithoutBoolean":"true" }}
There is no way to detect that the key TestWithBoolean have 'true' as the value. Using the fellowing event: Key "TestWithBoolean" = "true" doesn't work since its not a string but a boolean without quotes.
The value in the debugging show 'true' for both the key but in real they different.
I even tried using a for each to write the values to the log of the browser and i got this..
TestWithBoolean : 0
TestWithoutBoolean : true
I would be glad if you could provide a simple workaround for now.
Link to .capx file (required!):
Here a simple sample which show the problem..
mediafire.com/download/rcru7arw9f7cl9g/DictionaryLoadBugWithBooleanAsJSON.capx
Steps to reproduce:
1. Load a dictionary with the JSON. {"c2dictionary":true,"data":{ "TestWithBoolean":true, "TestWithoutBoolean":"true" }}
2. Try to check if TestWithBoolean have the value 'true'. It won't work!
Observed result:
There is no way to detect a boolean. The event will never go in.
Expected result:
I expected to be able to test if TestWithBoolean had the value 'true' but i couldn't. At least it should detect TRUE and return 1 in that case..
Browsers affected:
Chrome: yes!
Firefox: yes!
Internet Explorer: yes!
Operating system & service pack:
Windows 7 64bits latest service pack...
Construct 2 version:
r146
Thanks for your help!