Is there a pattern for using XML for serialization without surcharges?
Similarly, can you use JSON in javascript? At least static properties?
Or maybe even for hash table streaming?
It's too easy to hopefully find something like
Object.Serialize (stream) where stream is a file overridden with your choice of other likely targets, using some default format like XML?
With object obj = stream.Deserialize () ...
+1
source to share
2 answers
Java has supported this since XMLEncoder 1.4. The format is quite compact, and XMLEncoder allows you to override the serialization of certain object classes, so you can use the default where appropriate and do what you want elsewhere.
+1
source to share
I suggest you watch XStream for. Net . I didn't use this option, but I found the original XStream simple enough to use in Java.
0
source to share