commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frédéric Desmoulins <to...@no-log.org>
Subject Re: Serialize and deserialize object to and from text
Date Thu, 28 Apr 2005 06:38:00 GMT
Hi,

If you consider that XML is text (it should be the case), then you can
check out Betwixt.

fred

Le mercredi 27 avril 2005 à 21:17 -0700, Edmond Wong a écrit :
> Hi,
> 
> I am looking for a text encoder and text decoder for object 
> serialization and deserialization.  Anyone has worked on such a tool 
> before, and can share the source code?
> 
> I have the encoder working using recursion and reflection, but I don't 
> have a clue on the way to use recursion and reflection to read the text 
> back to Java beans.  In fact, I have been trying to build the decoder 
> for weeks, and have been stucked on the case where the object contain a 
> collection of objects.
> 
> The encoder I have built have the following text output:
> 
> {book:Book={{name:java.lang.String="Hitchhiker 
> Guide"}{author:Author={{name:java.lang.String="Edmond 
> Wong"}{email:java.lang.String="edmond.wong@pacbell.net"}{address:java.lang.String="123
 
> Olive 
> Ave"}}}{price:double=49.99}{chapters:java.util.Vector={{chapter:Chapter={{no:int=1}{name:java.lang.String="Act

> I"}}}{chapter:Chapter={{no:int=2}{name:java.lang.String="Act 
> II"}}}{chapter:Chapter={{no:int=3}{name:java.lang.String="Act III"}}}}}}}
> 
> Thanks,
> 
> Edmond
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message