I\'m using the API of www.textlocal.in, which returns a JSON formatted object.
JSON
{
\"warnings\":[
{
\"messag
First of all you have to figure out what your API returns.
Right now you're trying to parse a List
of jsonToObj
Arrays
(List
). You have to decide whether to use a jsonToObj[]
or List
or a simple jsonToObj
which your API provides now:
var a = JsonConvert.DeserializeObject(richTextBox1.Text);
But this then throws:
JSON integer 918819437284 is too large or small for an Int32. Path 'messages[0].recipient', line 25, position 33."
So make sure you use a Long
for that.
public class messages
{
public string id { get; set; }
public long recipient { get; set; }
}
Furthermore you can add inDND
to your jsonToObj
class if you need the info:
public class jsonToObj
{
...
public string[] inDND { get; set; }
...
}