I'll see if I can give some premise as to what's wrong.
This snippet creates a RootObject by using Newtonsoft Json library.
var rootResult = new RootObject();
rootResult = JsonConvert.DeserializeObject<RootObject>(raw);
This is the class RootObject where the data is held (They are object's because the Rootobject isn't always going to get all the data, this object simply has all the possibilities.
public class RootObject
{
public object name { get; set; }
public object permalink { get; set; }
public object crunchbase_url { get; set; }
public object homepage_url { get; set; }
public object blog_url { get; set; }
public object blog_feed_url { get; set; }
public object twitter_username { get; set; }
public object category_code { get; set; }
public object number_of_employees { get; set; }
public object founded_year { get; set; }
public object founded_month { get; set; }
public object founded_day { get; set; }
public object deadpooled_year { get; set; }
public object deadpooled_month { get; set; }
public object deadpooled_day { get; set; }
public object deadpooled_url { get; set; }
public object tag_list { get; set; }
public object alias_list { get; set; }
public object email_address { get; set; }
public object phone_number { get; set; }
public object description { get; set; }
public object created_at { get; set; }
public object updated_at { get; set; }
public object overview { get; set; }
public object image { get; set; }
public List<object> products { get; set; }
public List<object> relationships { get; set; }
public List<object> competitions { get; set; }
public List<object> providerships { get; set; }
public object total_money_raised { get; set; }
public List<object> funding_rounds { get; set; }
public List<object> investments { get; set; }
public object acquisition { get; set; }
public List<object> acquisitions { get; set; }
public List<object> offices { get; set; }
public List<object> milestones { get; set; }
public object ipo { get; set; }
public List<object> video_embeds { get; set; }
public List<object> screenshots { get; set; }
public List<object> external_links { get; set; }
}
However later whenever I get a result that I know has the object image in the input this fails
Image image = (Image)input.image;
Also I found that you can make it work by making
int integer;
int? integer;
This works but not with classes
Image? image; <- Still throws an error
Any suggestions/help would be greatly appreciated.

New Topic/Question
Reply



MultiQuote






|