How do I deal with complex json data?

Get help using Construct 2

Post » Wed Feb 24, 2016 12:54 am

Hi there, so my developer partner (read: actual coder) and I are working on an RPG together. He's using the Google App Engine (RIP Parse) and I'll be doing the front end with Construct 2.

He's done an amazing job of getting facebook / GAE / Construct 2 to work together. However we're facing a problem, but maybe it's not really a problem, just a lack of understanding or known solution.

We are using the dictionary object to store data and this is fine, but as you can imagine, loading a character from a serve can be a lot of information.. inventory.. stats.. talent tree.. quest log.. etc.. what he has asked me about is being able to nest dictionaries IN dictionaries.. meaning something like this:


{
"c2dictionary":true,
"data":{
"moreData:{"eventMoreData":{"arrayData":[]}}
}
}

Does anyone know if there is a way for deep nesting of data for json with Construct 2? Maybe a certain plugin or maybe it's totally possible with the existing dictionary and my dev partner just doesn't know the trick to do it in Construct 2.


Thanks,
Caleb
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Wed Feb 24, 2016 1:29 am

Image ImageImage
B
169
S
50
G
174
Posts: 8,322
Reputation: 110,788

Post » Wed Feb 24, 2016 1:43 am

awesome we'll look into this! that does look very promising!
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Wed Feb 24, 2016 4:55 pm

@rexrainbow Hash object works very well for all of our complex JSON needs.

It loads and allows easy access to JSON like this.
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Wed Feb 24, 2016 10:03 pm

@gumshoe2029 thanks so much. that looks VERY promising. I've shared it with my partner to dig into it deeper.
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Thu Feb 25, 2016 4:43 am

@gumshoe2029

which plugin would achieve this? looking at this list we found, we were not sure which one is right:
http://c2rexplugins.weebly.com/

Maybe it's another plugin not in this list?

Thanks!
Caleb
B
59
S
9
G
1
Posts: 942
Reputation: 6,553

Post » Fri Feb 26, 2016 3:43 pm

Hash is the plugin that you want.

It is a C2 wrapper for the JavaScript HashMap object.

Hm.... odd, it is gone from there...

but here: plugin-hash-table_t65765
https://www.ravenheart.ca/home
I don't check the forums much anymore, but I will receive an email for PMs.

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,418
Reputation: 4,830

Post » Fri Feb 26, 2016 4:59 pm

ah ok cool we wouldn't have recognized that name. This is great. Thanks a lot @gumshoe2029
B
59
S
9
G
1
Posts: 942
Reputation: 6,553


Return to How do I....?

Who is online

Users browsing this forum: beohs, brunopalermo and 10 guests