UPDATE: So the error I was getting has changed. Originally I had this:
Type 'System.Collections.Generic.IDictionary`2[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Object, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]' is not supported for deserialization of an array
Now, I'm getting this:
I would like to thank the following link for providing some light to my problem: http://blog.dj-djl.com/2013/05/type-systemcollectionsgenericidictionar.html
Now, according to that link, one of the problems I had was placing the JSON Array in a simple JSON object. So what I'm assuming is that you can't send it as an array, but you can send it as JSON Object and make the array a parameter. I'm not sure if that makes sense as I wrote it.
As I wrote this, I realize that the class I'm using to get the JSON is not declared as an array. This could be why I'm getting that error. I will verify and update.
UPDATE 2: Changed it to array but it didn't work. I'm going to keep verifying some things but I might just try to use a string list instead of the object I created for the JSON to get the data. Be back in a few.
UPDATE 3: Changed the name of the object to match the name of the parameter in the JSON and to no avail. BUT
The error message changed. It can't be converted to the type of object I defined. Why? I'm not completely sure, but I have a feeling it's because the array of data that I need is inside a parameter.
UPDATE 4: Changed the object to a string array and I still get an error.
UPDATE 5: FUCKING GOT IT!!!!! Ok so what happened was that when I placed the JSON Array inside a JSON parameter, I no longer needed to get a string array, but rather one string which is all of the array. Now I get all of the array in string format. What follows is parsing that string to get the information I need. For now I'm ending it here.
No comments:
Post a Comment