我使用 google-http-java-client 和 GsonFactory 作为 json 工厂。当我得到这样的 JSON 对象时
{"to_latlnt" : null, "phone" : 77777777777}
GSON 将 to_latlng 反序列化为空的非空对象(我可以调用他的 setter 和 getter),但它必须为空。我怎样才能做到这一点?
我使用 google-http-java-client 和 GsonFactory 作为 json 工厂。当我得到这样的 JSON 对象时
{"to_latlnt" : null, "phone" : 77777777777}
GSON 将 to_latlng 反序列化为空的非空对象(我可以调用他的 setter 和 getter),但它必须为空。我怎样才能做到这一点?