public static Product DeSerialize(String Filename) { String jsonStream = File.ReadAllText(Filename); jsonStream = new CorrectOutput().output(jsonStream); JavaScriptSerializer ser = new JavaScriptSerializer(); ser.MaxJsonLength = 20000000; //stick it into a list Product jsondeserialized = ser.Deserialize<Product>(jsonStream); return jsondeserialized; }
//this is how we call out to crunchbase to get their full list of companies public static FinancialOrganization DeSerialize(String Filename) { String jsonStream = File.ReadAllText(Filename); jsonStream = new CorrectOutput().output(jsonStream); JavaScriptSerializer ser = new JavaScriptSerializer(); ser.MaxJsonLength = 20000000; //stick it into a list FinancialOrganization jsondeserialized = ser.Deserialize<FinancialOrganization>(jsonStream); return jsondeserialized; }