Showing
1 changed file
with
6 additions
and
6 deletions
| ... | @@ -155,13 +155,13 @@ public class PacingDetails { | ... | @@ -155,13 +155,13 @@ public class PacingDetails { |
| 155 | this.total = new PacingDetailsInner(json.optJSONObject(TOTAL)); | 155 | this.total = new PacingDetailsInner(json.optJSONObject(TOTAL)); |
| 156 | } | 156 | } |
| 157 | if (json.optJSONObject(MONTH) != null) { | 157 | if (json.optJSONObject(MONTH) != null) { |
| 158 | - this.total = new PacingDetailsInner(json.optJSONObject(MONTH)); | 158 | + this.month = new PacingDetailsInner(json.optJSONObject(MONTH)); |
| 159 | } | 159 | } |
| 160 | if (json.optJSONObject(WEEK) != null) { | 160 | if (json.optJSONObject(WEEK) != null) { |
| 161 | - this.total = new PacingDetailsInner(json.optJSONObject(WEEK)); | 161 | + this.week = new PacingDetailsInner(json.optJSONObject(WEEK)); |
| 162 | } | 162 | } |
| 163 | if (json.optJSONObject(DAY) != null) { | 163 | if (json.optJSONObject(DAY) != null) { |
| 164 | - this.total = new PacingDetailsInner(json.optJSONObject(DAY)); | 164 | + this.day = new PacingDetailsInner(json.optJSONObject(DAY)); |
| 165 | } | 165 | } |
| 166 | } | 166 | } |
| 167 | } | 167 | } |
| ... | @@ -216,8 +216,8 @@ public class PacingDetails { | ... | @@ -216,8 +216,8 @@ public class PacingDetails { |
| 216 | 216 | ||
| 217 | public PacingDetailsInner(JSONObject json) { | 217 | public PacingDetailsInner(JSONObject json) { |
| 218 | if (json != null) { | 218 | if (json != null) { |
| 219 | - this.goal = json.optDouble(GOAL); | 219 | + this.goal = json.optDouble(GOAL, 0.0d); |
| 220 | - this.value = json.optDouble(VALLUE); | 220 | + this.value = json.optDouble(VALLUE, 0.0d); |
| 221 | if (json.optJSONArray(PER_DAY) != null) { | 221 | if (json.optJSONArray(PER_DAY) != null) { |
| 222 | JSONArray perDay = new JSONArray(); | 222 | JSONArray perDay = new JSONArray(); |
| 223 | perDay = json.optJSONArray(PER_DAY); | 223 | perDay = json.optJSONArray(PER_DAY); |
| ... | @@ -275,7 +275,7 @@ public class PacingDetails { | ... | @@ -275,7 +275,7 @@ public class PacingDetails { |
| 275 | public PacingDetailsDay(JSONObject json) { | 275 | public PacingDetailsDay(JSONObject json) { |
| 276 | if (json != null) { | 276 | if (json != null) { |
| 277 | this.day = json.optString(DAY); | 277 | this.day = json.optString(DAY); |
| 278 | - this.value = json.optDouble(VALLUE); | 278 | + this.value = json.optDouble(VALLUE, 0.0d); |
| 279 | } | 279 | } |
| 280 | } | 280 | } |
| 281 | 281 | ... | ... |
-
Please register or login to post a comment