Prasing complex JSON Strings into Dictionary

Get help using Construct 2

Post » Sun Aug 18, 2013 8:31 pm

Hi everyone,

I'm trying to prase a complex json array with level data, but it doesn't seem to work the way i try.

My JSON string looks like this.
http://thexeroxprojects.be/samples/construct2/level1.txt


I'm trying it this way, but i can't seem to get passed the first key.


RESULT


I'm i doing it wrong and how do i do it the right way?

Thanks!
thexerox2013-08-18 20:38:41
B
6
S
1
Posts: 9
Reputation: 606

Post » Mon Aug 19, 2013 12:34 am

Dictionary as I understand it doesn't store data in objects. It's a pure Key/Value system. What you have is embedded data in a Value which is more an Object. So Dictionary won't work.

I could be wrong, but I've never got more advanced than basic key pairs work with Dictionary. If you need more advanced JSON access I would suggest RexRainbow's HashTable plugin.

http://www.scirra.com/forum/plugin-hash-table_topic47637.html

It supports more complex JSON. I'm not sure if it goes 4/5 deep. But it's more than just Key/Value.
B
90
S
18
G
9
Posts: 2,455
Reputation: 15,013

Post » Fri Aug 23, 2013 1:54 pm

Thx! I'm made it work trough the hash table plugin. Will add an example soon!
B
6
S
1
Posts: 9
Reputation: 606


Return to How do I....?

Who is online

Users browsing this forum: ezgaming420, Yahoo [Bot] and 9 guests