String classField = classInfo.getClassField();
String stype = jsonObj.optString(classField, null);
if ((stype == null) && Modifier.isAbstract(type.getModifiers()) &&
(jsonObj.length() == 1)) {
// if otherwise doomed to fail, try supporting "type-value : {...}" syntax
stype = jsonObj.keySet().iterator().next();
jsonObj = jsonObj.getJSONObject(stype);
}
try {
if (stype != null) {
Class<?> atype = classInfo.getClass(stype);