com.aliyun.openservices.eas.predict.response.JsonResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eas-sdk Show documentation
Show all versions of eas-sdk Show documentation
SDK for PAI-EAS online inference services
package com.aliyun.openservices.eas.predict.response;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONException;
import com.google.common.reflect.TypeToken;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class JsonResponse {
public static class ResponseItem {
private String outputLabel;
private Map outputValue;
private Map outputMulti;
public String getOutputLabel() {
return outputLabel;
}
public void setOutputLabel(String outputLabel) {
this.outputLabel = outputLabel;
}
public Map getOutputValue() {
return outputValue;
}
public void setOutputValue(Map outputValue) {
this.outputValue = outputValue;
}
public Map getOutputMulti() {
return outputMulti;
}
public void setOutputMulti(Map outputMulti) {
this.outputMulti = outputMulti;
}
}
public void setContentValues(byte[] content) throws Exception {
try {
Map output = JSON.parseObject(new String(content),
new TypeToken