-
As Watson Assistant's context need to be propagated during a set of conversation, I need to serialize the WA context into external storage such as Redis or Browser cookie. However, com.ibm.watson.assistant.v1.model.Context does not implement java.io.Serializable, so I have no idea to serialize context. In the source code of Context, there are SerializedName annotation and it seems Context is designed serializable. Why Context does not implement java.io.Serializable? Any workaround to serialize WA context? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @ruimo, You can try the following |
Beta Was this translation helpful? Give feedback.
Hi @ruimo,
You can try the following
GsonSingleton.getGson().toJson(contextModel);
. Let me know if it works for you!