简体   繁体   中英

Gson avoid reflection

Is there a way to avoid reflection in Gson? I know that when you will use registerTypeAdapter you can avoid it, but if you use @SerializedName("name") annotation on class member, can you avoid id too?

您可以使用AutovalueAutovalue-gson为您创建一个无反射的适配器。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM