...
This commit is contained in:
parent
aff4b37d5c
commit
9e8401ea8e
|
@ -148,7 +148,14 @@ public class DemandDataListener implements TaskListener, ExecutionListener, Acti
|
|||
|
||||
private void complete(DelegateTask delegateTask) {
|
||||
Map<String, Object> kv = delegateTask.getVariables();
|
||||
Gson gson = new Gson();
|
||||
GsonBuilder builder = new GsonBuilder();
|
||||
builder.registerTypeAdapter(Date.class, new JsonDeserializer<Date>() {
|
||||
public Date deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
|
||||
return new Date(json.getAsJsonPrimitive().getAsLong());
|
||||
}
|
||||
});
|
||||
|
||||
Gson gson = builder.create();
|
||||
JsonElement jsonElement = gson.toJsonTree(kv);
|
||||
TDemandDataDTO demandDataDTO = gson.fromJson(jsonElement, TDemandDataDTO.class);
|
||||
|
||||
|
|
Loading…
Reference in New Issue