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
24
S
4
G
2
Posts: 96
Reputation: 2,467

Post » Sun Oct 27, 2013 1:14 am

Worked, thank you so much.
B
24
S
4
G
2
Posts: 96
Reputation: 2,467

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
53
S
22
G
18
Posts: 2,122
Reputation: 17,123


Return to How do I....?

Who is online

Users browsing this forum: blue visionary, OBLIVION and 14 guests