Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hi,
- I'm trying to load a JSON that's make it possible to load via a variable likes this :
- var SomeJsonData = SomeJSON[id].someParam;
- so I already have some Samples codes for the template who look kinda like this :
- [System.Serializable]
- public class Heroes {
- public static List<this>;
- public int id; //
- public int classId;
- public List<int> equips;
- public int initialLevel;
- public int maxLevel;
- public string name;
- public string lastName;
- public string profile;
- }
- and my JSON look like this :
- [
- null,
- {
- "id":1,
- "classId":1,
- "equips":[],
- "initialLevel":1,
- "maxLevel": 20,
- "name":"Yuu",
- "LastName":"Shiki",
- "profile":"A young Cleric who got raised by the church of art."
- },
- {
- "id": 2,
- "classId": 2,
- "equips": [],
- "initialLevel":1,
- "maxLevel": 20,
- "name":"Yuu",
- "LastName":"Shiki",
- "profile":"A young Cleric who got raised by the church of art."
- }
- ]
- As I know the JSON serializer can't load Array JSON? I was unsure for this....
- so I don't mind to change a little the structure of my JSON but it's possible to get a way's I can get my JSON data by using the method said above? I know it's not the MOST optimal code but I kinda want to be able to get the data of my Heroes from a id. like TheData[id].SomeParam
- thanks for your further answer :)
- Nio Kasgami
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement