Closed cancilla closed 4 years ago
+1 to the concept, we need to decide if we "pollute" the high level interfaces with Gson or instead have utilities in a com.ibm.streamsx.topology.gson
package.
We also need to easily have streams of JsonObject
(Gson) as well as the existingJSONObject
(JSON4J).
I would like to propose that the Java Topology API be enhanced to support publish and subscribe using Gson. Having integrated Gson support would be beneficial as it allows for finer grained control over the serialization and deserialization processes. It also allows for going directly from a JSON string to a Java object.
The following are an initial set of APIs that I believe would be beneficial. I am proposing that we pass an instance of
Gson
directly to thepublish()
andsubscribe()
method as it gives the user full control over how theGson
instance is constructed.I look forward to discussing this point further.