-
1. Using Transformers for serialization
kcbabo Mar 25, 2011 8:18 AM (in response to kcbabo)Just to clarify on use case #1 above, the requirement for a JavaBean is for user-supplied classes. For example, if your content type is XML, you will not need to convert to a JavaBean. The requirement for a JavaBean representation is there to avoid class incompatibility issues that come up using Java serialization.
-
2. Using Transformers for serialization
dward Apr 13, 2011 10:44 AM (in response to kcbabo)Instead of using Transformers for Serialization, we can think in the other direction: Serializers for Transformation.
We have 2 JIRAs out there now where we want to implement a new kind of Transformer: JSON and Protobuf
Implementing these by wrapping existing Serializers is brain-dead easy. Please see my comments on each JIRA here:
-
3. Using Transformers for serialization
dward Apr 13, 2011 11:14 AM (in response to dward)OR! We could just have a single Transformer that uses SerializerType to key off of:
<transform.serial type="JSON_PROTOSTUFF"/> or <transform.serial type="PROTOBUF_PROTOSTUFF"/>
The value of the type attribute would be the SerializerType enum name, per: http://goo.gl/uqsDM
This way we don't have to have separate Transformers for every type of serialization we want to do.