|
|
@ -240,11 +240,13 @@ public class FoodActivity extends BaseActivity { |
|
|
|
avgRestaurantRating = jsonResponse.getJSONObject(JSON_TAG_FOOD_AVG_RATING_OBJ).getDouble(JSON_TAG_FOOD_AVG_RATING); |
|
|
|
} |
|
|
|
|
|
|
|
String foodCaloriesString = jsonFoodInfo.getString(JSON_TAG_FOOD_CALORIES); |
|
|
|
|
|
|
|
food = new Food(jsonFoodInfo.getInt(JSON_TAG_FOOD_ID), |
|
|
|
jsonFoodInfo.getString(JSON_TAG_FOOD_NAME), |
|
|
|
jsonResponse.getString(JSON_TAG_FOOD_RESTAURANT_NAME), |
|
|
|
jsonFoodInfo.getString(JSON_TAG_FOOD_DESCRIPTION), |
|
|
|
jsonFoodInfo.getInt(JSON_TAG_FOOD_CALORIES), |
|
|
|
foodCaloriesString.equals("null") ? -1 : Integer.parseInt(foodCaloriesString), |
|
|
|
avgRestaurantRating); |
|
|
|
|
|
|
|
JSONArray jsonIngredients = jsonResponse.getJSONArray(JSON_TAG_FOOD_INGREDIENTS); |
|
|
|