mirror of
https://github.com/openbullet/openbullet.git
synced 2023-10-21 07:33:42 -05:00
Fix JSON Parsing using JToken
This commit is contained in:
@@ -211,12 +211,12 @@ namespace RuriLib.Utils.Parsing
|
||||
if (input.Trim().StartsWith("["))
|
||||
{
|
||||
JArray json = JArray.Parse(input);
|
||||
list.Add(json.SelectToken(field, false).ToString());
|
||||
list.Add(json.SelectToken(field, false).First().ToString());
|
||||
}
|
||||
else
|
||||
{
|
||||
JObject json = JObject.Parse(input);
|
||||
list.Add(json.SelectTokens(field, false).ToString());
|
||||
list.Add(json.SelectTokens(field, false).First().ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user