One of my events returns an array of bools (just true or false) to me.
It's the only return so I'm trying to iterate over my bools that I get but I can't seem to access them nicely by index.
For example my scriptData I get back is like this:
http://puu.sh/kaimE/c9bc94e70d.png
How would I be able to get that list of values out? All my previous data has been single data retrieval so by name for int/double etc.
Thanks.
Best Answer
T
Travis Evashkevich
said
over 5 years ago
Yeah I ended up just doing a little class to throw it into. I'm just new to JSON and not used to not having to just parse everything and put it where I want to so having to make a class that has the same names and such is just new and a work in progress for me :P
doesn't work either, just says it has to be a JSONArray which isn't a type I have (using the newtonsoft.Json library so...no idea)
T
Travis Evashkevich
said
over 5 years ago
I guess I'll just have to make some dummy classes for getting my data.
Just not used to how JSON works I guess
Customer Support
said
over 5 years ago
Hey Travis,
Apologies for the late reply. Did you manage to get the data you needed out?
Sean
T
Travis Evashkevich
said
over 5 years ago
Answer
Yeah I ended up just doing a little class to throw it into. I'm just new to JSON and not used to not having to just parse everything and put it where I want to so having to make a class that has the same names and such is just new and a work in progress for me :P
Travis Evashkevich
Hey,
One of my events returns an array of bools (just true or false) to me.
It's the only return so I'm trying to iterate over my bools that I get but I can't seem to access them nicely by index.
For example my scriptData I get back is like this:
http://puu.sh/kaimE/c9bc94e70d.png
How would I be able to get that list of values out? All my previous data has been single data retrieval so by name for int/double etc.
Thanks.
Yeah I ended up just doing a little class to throw it into. I'm just new to JSON and not used to not having to just parse everything and put it where I want to so having to make a class that has the same names and such is just new and a work in progress for me :P
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstTravis Evashkevich
No matter what I try I can't seem to get it out.
I've tried just converting the JSON to xml via the JSON.xnode function (doesn't work because of the array inside),
tried
JsonConvert.DeserializeObject<bool[]>(dunResponse.ScriptData.JSON);
doesn't work either, just says it has to be a JSONArray which isn't a type I have (using the newtonsoft.Json library so...no idea)
Travis Evashkevich
I guess I'll just have to make some dummy classes for getting my data.
Just not used to how JSON works I guess
Customer Support
Apologies for the late reply. Did you manage to get the data you needed out?
Sean
Travis Evashkevich
Yeah I ended up just doing a little class to throw it into. I'm just new to JSON and not used to not having to just parse everything and put it where I want to so having to make a class that has the same names and such is just new and a work in progress for me :P
-
Documentation Notes
-
Design issues with user events
-
Using NoSQL
-
Runtime Collections vs Metadata Collections
-
Anonymous authentication from browser app
-
Modules
-
Movement With Unity
-
Problem with url parameters for downloadables
-
Querying NoSql GameSparks database
-
Challenge accesType
See all 2486 topics