All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.gitee.huangguiming.Imcode.adapter.IMGetAllGroupResponsesAdapter Maven / Gradle / Ivy

There is a newer version: 1.0.4
Show newest version
package io.gitee.huangguiming.Imcode.adapter;


import com.google.gson.*;
import io.gitee.huangguiming.Imcode.responses.IMGetAllGroupResponses;
import io.gitee.huangguiming.Imcode.utils.GsonHelper;

import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collections;
import java.util.Objects;

public class IMGetAllGroupResponsesAdapter implements JsonDeserializer {

    @Override
    public IMGetAllGroupResponses deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
        JsonObject o = json.getAsJsonObject();
        IMGetAllGroupResponses imGetAllGroupResponses = new IMGetAllGroupResponses();
        imGetAllGroupResponses.setActionStatus(GsonHelper.getString(o,"ActionStatus"));
        imGetAllGroupResponses.setGroupIdList(GsonHelper.getStringList(o, "GroupIdList"));
        imGetAllGroupResponses.setErrorCode(GsonHelper.getInteger(o,"ErrorCode"));
        imGetAllGroupResponses.setErrorInfo(GsonHelper.getString(o,"ErrorInfo"));
        imGetAllGroupResponses.setTotalCount(GsonHelper.getInteger(o,"TotalCount"));
        imGetAllGroupResponses.setNext(GsonHelper.getInteger(o,"Next"));
        return imGetAllGroupResponses;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy