I find it hard how to deserialize this json string i think this is 2 dimensional json array. please help . im using C#
I suggest you throw your json into this site and see if it can generate the classes for you. Then, you will have to set this class up depending on what json deserializer you are using. Unity has one built in. Also suggest json.net on the asset store is a good one.
i tried it and it generate classes but i dont have any json deserializer yet. i tried some but it won’t work
Which json deserializer are you trying to use?
im using JsonUtility and LitJson but didn’t work … what im trying to do is to get the description …
Can you paste your code that didn’t work, so we can help you fix it? Neither JsonUtility nor LitJson should have any trouble deserializing that JSON.
I’m not familiar with LitJson, but JsonUtility I believe requires you to create the class using fields that are serializable. But as @StarManta said, if you post your class that you are going to deserialize into and post your code, we may help you better.
thanks for your help guys!, i solved it…
I’ve found json.net to be a really good package that has some verbose error messages. LitJson and JsonUtility are easy but don’t really give you much to go on in terms of debugging.
If you want to build more complex classes to serialize I suggest giving json.net a shot. GitHub - SaladLab/Json.Net.Unity3D: Forked Newtonsoft.Json to support Unity3D
ok i’ll try this one. thanks