生成的类
public class XXDownloadActivity$$ARouter$$Autowired implements ISyringe {
private SerializationService serializationService;
@Override
public void inject(Object target) {
serializationService = ARouter.getInstance().navigation(SerializationService.class);
StickerDownloadActivity substitute = (StickerDownloadActivity)target;
substitute.mainStickerBean = (com.xx.bean.XXBean.InnerXXBean) substitute.getIntent().getSerializableExtra("key_data");
}
}
jsonService
@Route(path = "/service/json")
public class JsonServiceImpl implements SerializationService {
Gson gson = new Gson();
@Override
public <T> T json2Object(String input, Class<T> clazz) {
// return JSON.parseObject(input, clazz);
return gson.fromJson(input,clazz);
}
@Override
public String object2Json(Object instance) {
// return JSON.toJSONString(instance);
return gson.toJson(instance);
}
@Override
public <T> T parseObject(String input, Type clazz) {
// return JSON.parseObject(input, clazz);
return gson.fromJson(input,clazz);
}
@Override
public void init(Context context) {
}
}
1条答案
按热度按时间knsnq2tg1#
你看你的 XXBean 是不是实现了 Serializable