private void fromJSONFoodBlocks(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); JSONArrayValue json_array1 = json_value.array_value(); if (json_array1 == null) { throw new Exception("The value for field FoodBlocks of NutritionInformationNuggetJSON is not an array."); } int count1 = json_array1.componentCount(); List <List <FoodJSON> > vector_FoodBlocks1 = new List <List <FoodJSON> >(count1); for (int num1 = 0; num1 < count1; ++num1) { JSONArrayValue json_array2 = json_array1.component(num1).array_value(); if (json_array2 == null) { throw new Exception("The value for an element of field FoodBlocks of NutritionInformationNuggetJSON is not an array."); } int count2 = json_array2.componentCount(); List <FoodJSON> vector_FoodBlocks2 = new List <FoodJSON>(count2); for (int num2 = 0; num2 < count2; ++num2) { FoodJSON convert_classy = FoodJSON.from_json(json_array2.component(num2), ignore_extras, true); vector_FoodBlocks2.Add(convert_classy); } vector_FoodBlocks1.Add(vector_FoodBlocks2); } initFoodBlocks(); for (int num2 = 0; num2 < vector_FoodBlocks1.Count; ++num2) { appendFoodBlocks(vector_FoodBlocks1[num2]); } for (int num1 = 0; num1 < vector_FoodBlocks1.Count; ++num1) { for (int num2 = 0; num2 < vector_FoodBlocks1[num1].Count; ++num2) { } } }