some JSON fixes
This commit is contained in:
@@ -108,9 +108,9 @@ public class ContentParser{
|
|||||||
if(data.isString()){
|
if(data.isString()){
|
||||||
return field(Bullets.class, data);
|
return field(Bullets.class, data);
|
||||||
}
|
}
|
||||||
var bc = resolve(data.getString("type", ""), BasicBulletType.class);
|
Class<?> bc = resolve(data.getString("type", ""), BasicBulletType.class);
|
||||||
data.remove("type");
|
data.remove("type");
|
||||||
BulletType result = make(bc);
|
BulletType result = (BulletType)make(bc);
|
||||||
readFields(result, data);
|
readFields(result, data);
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
@@ -150,7 +150,7 @@ public class ContentParser{
|
|||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
put(DrawPart.class, (type, data) -> {
|
put(DrawPart.class, (type, data) -> {
|
||||||
var bc = resolve(data.getString("type", ""), RegionPart.class);
|
Class<?> bc = resolve(data.getString("type", ""), RegionPart.class);
|
||||||
data.remove("type");
|
data.remove("type");
|
||||||
var result = make(bc);
|
var result = make(bc);
|
||||||
readFields(result, data);
|
readFields(result, data);
|
||||||
|
|||||||
Reference in New Issue
Block a user