com.aliyun.openservices.eas.predict.response.JsonResponse Maven / Gradle / Ivy
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