Updates parse function to make use of the new getString/getChar functions of VJSON.
@@ -54,10 +54,10 @@ public class CheckBoxBuilder extends ButtonBuilder {
super.parse(jsonObject);
- final String text = (String) jsonObject.get("text");
+ final String text = getString(jsonObject, "text");
- final Character emptyBoxChar = (Character) jsonObject.get("emptyBoxChar");
- final Character checkedBoxChar = (Character) jsonObject.get("checkedBoxChar");
+ final Character emptyBoxChar = getChar(jsonObject, "emptyBoxChar");
+ final Character checkedBoxChar = getChar(jsonObject, "checkedBoxChar");
final Boolean isChecked = (Boolean) jsonObject.get("isChecked");
@@ -67,7 +67,6 @@ public class CheckBoxBuilder extends ButtonBuilder {
}
-
if (emptyBoxChar != null) {
this.emptyBoxChar = emptyBoxChar;
}
@@ -77,7 +76,6 @@ public class CheckBoxBuilder extends ButtonBuilder {
}
-
if (isChecked != null) {
this.isChecked = isChecked;
}
