[r116] Weird .json download from Dictionary object

Bugs will be moved here once resolved.

Post » Sat Jan 19, 2013 12:51 am

Hi,

I'm pretty sure this is a bug.

First, in my game, I'm using the dictionary object to handle text. Everything is working fine whitin the game, but when I try to download the .json file from the dictionary, I get this:



This is the code:



---

I've also tried to replicate the error on a new project, this is what happens:



And here's the code:



So maybe I'm missing something, but it seems that the dictionary value can't into spacing, but ONLY when I try to download the .json file. In-game everything works, spaces and everything:



Thanks.andreyin2013-01-22 02:23:32
B
106
S
35
G
36
Posts: 792
Reputation: 24,703

Post » Sat Jan 19, 2013 5:23 pm

I can reproduce this too. This is the code:

And this is the resulting JSON data:
[code]{"c2dictionary":true,"data":{"FirstName":"Al","LastName":"Bundy","Age":52,"AreaOfResidence":"Chicago,Illinois,UnitedStatesofAmerica","Occupation":"Shoesalesman"}}[/code]
Both Chrome and Firefox generate the game .json file. Spaces are removed and placing an apostrophe anywhere truncates the apostrophe and everything following it. This also happens with array JSON data. The AsJSON expression seems to be working properly, though.
If you need a .capx to look at, here it is.Przemek327672013-01-19 17:24:41
B
160
S
75
G
28
Posts: 55
Reputation: 22,548

Post » Sat Jan 19, 2013 5:38 pm

It didn't even occur to me to test on another browser, so I forgot to mention, I tested it on Chrome.
B
106
S
35
G
36
Posts: 792
Reputation: 24,703

Post » Mon Jan 21, 2013 11:02 am

Thanks, should be fixed in the next build. Try to always remember to test other browsers!
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests