【发布时间】:2011-10-27 09:40:16
【问题描述】:
我使用 google-http-java-client 和 GsonFactory 作为 json 工厂。 当我得到这样的 JSON 对象时
{"to_latlnt" : null, "phone" : 77777777777}
GSON 将 to_latlng 反序列化为空的非空对象(我可以调用他的 setter 和 getter),但它必须为空。 我怎样才能做到这一点?
【问题讨论】:
-
“不为空”是什么意思?
-
它的类名是 com.jettaxi.api.LatLng 和 == with null 是 false
标签: android null gson google-api-java-client