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

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

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

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSerializer;
import io.gitee.huangguiming.Imcode.responses.IMCreateGroupResponse;

import java.lang.reflect.Type;

public class IMCreateGroupsResponseAdapter implements JsonSerializer {


    @Override
    public JsonElement serialize(IMCreateGroupResponse obj, Type typeOfSrc, JsonSerializationContext context) {
        JsonObject messageJson = new JsonObject();
        messageJson.addProperty("ActionStatus",obj.getActionStatus());
        messageJson.addProperty("ErrorInfo",obj.getErrorInfo());
        messageJson.addProperty("ErrorCode",obj.getErrorCode());
        messageJson.addProperty("GroupId",obj.getGroupId());
        return messageJson;
    }


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy