android-gson

    1熱度

    1回答

    我有這個JSON形式: [ { "command":"", "name":"گزارش صدور", "children": [ { "command":"ReportDaily", "name":"Daily", "children":[], "path":"/Sa/Certificat

    0熱度

    4回答

    我得到一個json結果從服務與改造像波紋管: { "result": { "totalCount": 15, "resultCount": 2, "offset": 0, "limit": 2, "products": [ { "id": 10081, "name": "prod",

    0熱度

    1回答

    我正在使用retorfit從Steam API獲取數據,但我的響應爲空,但日誌顯示正確的JSON響應。 這是從API的JSON: { "response": { "players": [ { "steamid": "76561197960435530", "communityvisibilitystate": 3, "profile

    0熱度

    1回答

    當我使用Retrofit進行API調用時,我得到了下面的JSON響應。 現在我想將數據映射到模型。什麼是最好的方式來做到這一點?提前致謝。 編輯:這是真正的JSON響應。 { "status": "success", "data": { "messages": [], "result": { "clinicCode": "Medics", "firs

    -3熱度

    1回答

    我能夠在Retrofit中使用日誌攔截器來獲取響應,但我的onResponse沒有被調用。 我使用的兩個模型類如下所示,還有兩個名爲Result和JobTitle。 MainResponse.class public class MainResponse { @SerializedName("status") @Expose private String status; @Seriali

    1熱度

    4回答

    我正在使用Gson創建Json字符串。到目前爲止,我已經有幾個成員序列化了一個相對較小的類,所以我剛剛創建了一個需要成員的類,並且使用toJson來創建json。如果它與這個問題有關,那麼它就在Android應用程序中。 現在我需要創建一個更復雜的json,其中包含許多字段和幾個級別。在JSON的例子(至少它的一部分只是爲了顯示它的「精神」): "sleep" : { "program"

    3熱度

    1回答

    我正在爲我的android項目嘗試在Kotlin語言中實現一些特定的GSON TypeAdapter。 我現在面臨的問題是編譯誤差不能推斷類型:Type inference failed: 'T' cannot capture 'in (T..T?'. Type parameter has an upper bound 'Enum<T>' that cannot be satisfied capt

    1熱度

    4回答

    如何使用GSON庫和Volley解析低於JSON。 [ { "code": 1, "message": "Scan Details", "result": [ { "Inbound Date": "2017-10-13", "Outobund Date": "2017-10-16", "In

    0熱度

    1回答

    我想設置的ProGuard我的應用程序,我遇到了以下錯誤致命錯誤: java.lang.NoSuchMethodError: No static method getParameterized(Ljava/lang/reflect/Type;[Ljava/lang/reflect/Type;)Lcom/google/gson/reflect/TypeToken; in class Lcom/goo

    0熱度

    1回答

    我試圖通過改造來檢索對象的列表: public interface TemplateApi { @GET("/api/templates") Observable<List<TemplateDto>> getList(); } 這裏的DTO: public class TemplateDto { public String id; public Str