[Simple-support] value preprocessing before deserialization
Brought to you by:
niallg
|
From: Paweł K. <paw...@gm...> - 2009-01-19 09:47:10
|
Hi,
I need to (de)serialize a list of java beans to/from XML message. The
problem is that all values (i.e. integers, doubles, dates etc.) in
each bean are sent as base64-encoded strings, e.g.:
<response>
<person>
<name>[base64-encoded String]</name>
<age>[base64-encoded int]</name>
<birthDate>[base64-encoded date]</birthDate>
...
</person>
</response>
Is there a simple way to decode those beans without holding all their
fields as Strings?
I thought of creating a custom transformation, but then I would have
to reimplement all the default transforms as they are not exported by
the org.simpleframework.xml package (all classes have "package
private" scope).
I was also considering a custom strategy, but again - the
DefaultStrategy is "package private" too.
Thanks in advance,
Pawel
|