【发布时间】:2018-02-10 10:07:43
【问题描述】:
在我的应用程序中,我使用 Gson 转换器进行改造。以下是gradles。
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.google.code.gson:gson:2.6.1'
从 Magento2 后端收到 json 格式的响应。这里的 JSON 标准是 RFC7159。 Gson 不支持它。就像作为回应,我只得到以下值
响应 1:“一些字符串”, 回应 2:是的
Gson 无法读取这些值。为了读取这些值或支持 RFC7159 标准,我需要做哪些更改。请提出建议。
【问题讨论】:
-
您使用哪个版本的 GSON?
-
如果您使用早于 2.6.1 的版本,我可以发布一个可行的解决方案
标签: android json gson retrofit