I'm creating a little system to let me see who is in my chat on Twitch using their JSON API. However, while I successfully got the information, I can't figure out how to parse it correctly.
This is the string that is being produced:
{
"_links": {},
"chatter_count": 1,
"chatters": {
"moderators": [
"teonnyn"
],
"staff": [],
"admins": [],
"global_mods": [],
"viewers": []
}
}
This is the object I created to deserialize it to, but I have no idea for sure if it's exactly correct:
public class users
{
public string[] links;
public int chatter_count;
public string[] moderators;
public string[] staff;
public string[] admins;
public string[] global_mods;
public string[] viewers;
}
I'm using Newtonsoft.JSON to parse it - which would be the correct way to push the string to the "users" object?