How I do use Json + Dictionary

Get help using Construct 2

Post » Sun Oct 27, 2013 1:01 am

Sorry for asking something so stupid. But I spent hours, read several forum posts and still can not read a variable from a JSON into a dictionary (dictionary.get ("name")).

My Json:
{"c2dictionary": true, "data": {"name": "blablabla", "race": "blalalala", "id": 1}}



CAPX

Anyone can help me? =/
B
25
S
4
G
2
Posts: 99
Reputation: 2,498

Post » Sun Oct 27, 2013 1:14 am

Worked, thank you so much.
B
25
S
4
G
2
Posts: 99
Reputation: 2,498

Post » Sun Oct 27, 2013 1:52 am

@moebios : You should :

load from JSON string AJAX.LastData in your dictionnary
I think

EDIT:I'll explain:

AJAX.LastData is the content of the file you want, while "test.json" content is... test.json (not the file, but the string)Aphrodite2013-10-27 01:55:02
Game design is all about decomposing the core of your game so it becomes simple instructions.
B
54
S
22
G
18
Posts: 2,123
Reputation: 17,150


Return to How do I....?

Who is online

Users browsing this forum: Google [Bot] and 5 guests