- Home /
Question by
Ekta-Mehta-D · Feb 11, 2021 at 07:43 AM ·
unity 2djsonparsedeserialization
Parse JSON Data with JSON Utility to Dictionary object
Hii.. I have below JSON structure.
{
"playerCards":{
"6024dddd3a60164d2c237761":[
{
"c":"R",
"n":9,
"cc":1
},
{
"c":"B",
"n":0,
"cc":0
},
{
"c":"Y",
"n":5,
"cc":1
},
{
"c":"G",
"n":10,
"cc":0
},
{
"c":"G",
"n":12,
"cc":0
},
{
"c":"B",
"n":7,
"cc":1
},
{
"c":"R",
"n":7,
"cc":1
}
],
"6024ddee3a60164d2c237768":[
{
"c":"Y",
"n":1,
"cc":1
},
{
"c":"B",
"n":10,
"cc":1
},
{
"c":"R",
"n":2,
"cc":0
},
{
"c":"Y",
"n":4,
"cc":0
},
{
"c":"K",
"n":14,
"cc":3
},
{
"c":"Y",
"n":11,
"cc":1
},
{
"c":"Y",
"n":6,
"cc":1
}
]
}
}
I have userID as key. So i have to parse this JSON in Dictionary variable. I have checked this link : Deserialize JSON Structure
How we can do with JSONUtility ?
Comment
Your answer
Follow this Question
Related Questions
Deserialize TexturePacker JSON at run time 2 Answers
Deserializing Json problem in Hololens app 1 Answer
Parsing from JSON NullReferenceException: Object reference not set to an instance of an object 2 Answers
JSON invalid value 1 Answer
How to Parse the JSON to get an array of image URLs. 0 Answers