Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
使用 moshi 序列化为 json 字符串时,是否有一种简单的方法可以忽略字段?我只能想到一个自定义适配器——但我感觉有更好的方法
用于transient字段声明。
transient
private transient String your_variable_name;
最初我发现从序列化和反序列化中排除字段
希望对你有帮助。