On Tue, Dec 2, 2008 at 6:38 PM, Chouser <[EMAIL PROTECTED]> wrote:
>
> On Tue, Dec 2, 2008 at 3:52 PM, Mark Volkmann <[EMAIL PROTECTED]>
> wrote:
> >
> > (def my-string (print-dup [1 2 3]))
> > (def my-data (read my-string))
> >
> > Can you give a simple example of serializing and deserializing a
On Tue, Dec 2, 2008 at 3:52 PM, Mark Volkmann <[EMAIL PROTECTED]> wrote:
>
> (def my-string (print-dup [1 2 3]))
> (def my-data (read my-string))
>
> Can you give a simple example of serializing and deserializing a
> Clojure collection?
For "serializing" you have a couple options:
(def my-string
On Tue, Dec 2, 2008 at 12:52 PM, Rich Hickey <[EMAIL PROTECTED]> wrote:
>
> On Dec 2, 7:02 am, Parth Malwankar <[EMAIL PROTECTED]> wrote:
>> Tayssir John Gabbour wrote:
>> > Hi!
>>
>> > How should I approach serialization? I made a little test function
>> > which serializes and deserializes Clojur
On Dec 2, 11:52 pm, Rich Hickey <[EMAIL PROTECTED]> wrote:
> As part of AOT I needed to enhance print/read to store constants of
> many kinds, and restore faithfully. This led to a new multimethod -
> print-dup, for high-fidelity printing. You can get print-dup behavior
> by binding *print-dup*:
On Dec 2, 7:02 am, Parth Malwankar <[EMAIL PROTECTED]> wrote:
> Tayssir John Gabbour wrote:
> > Hi!
>
> > How should I approach serialization? I made a little test function
> > which serializes and deserializes Clojure objects. It works for
> > strings, integers, symbols, LazilyPersistentVectors
I've been working on the same issue. So far it has mostly been just
researching various options, but I can give you my two cents...
It really depends on your goals and constraints. I have narrowed down
to two major families of serialization for storage and networking. One
is the JSON/YAML/X
JBossSerialization looks nifty, though I haven't tried it yet:
http://www.jboss.org/serialization/
Thanks to everyone who responded! (I've just been immersing myself in
Externalizable, object versioning, etc; and your thoughts have been
helpful.)
All best,
Tayssir
On Dec 2, 9:57 am, Tayssir J
Don't forget XMLEncoder/XMLDecoder. They come in pretty handy when you
want to serialize objects that (already) follow bean conventions.
-- KD
Dakshinamurthy Karra
(blog: http://blog.marathontesting.com)
(daily dose: http://twitter.com/marathontesting)
On Tue, Dec 2, 2008 at 4:06 PM, Tayssir
Tayssir John Gabbour wrote:
> Hi!
>
> How should I approach serialization? I made a little test function
> which serializes and deserializes Clojure objects. It works for
> strings, integers, symbols, LazilyPersistentVectors and.. oddly..
> PersistentHashMaps that have exactly one element. (My C
Interesting, thanks for the new perspective! Using YAML seems more
flexible than what I was thinking, particularly since Clojure
apparently doesn't make me worry too much about the specific kind of
sequence/map I'm using.
(Yeah, I have an app which sends serialized objects all over the
place, and
I use YAML to serialize. I needed a simple way to pass Maps, Lists and
Vector between java, Ruby and Clojure components.
I change the classes of Clojure in the YAML output to java.util.Map,
List and so on to remove dependencies
on Clojure classes while retaining the ability to walk through the
str
On Dec 2, 9:57 am, Tayssir John Gabbour <[EMAIL PROTECTED]>
wrote:
> (defn my-identity "Copies obj through serialization and
> deserialization."
> [obj]
> (let [byte-out (new java.io.ByteArrayOutputStream)
> obj-out (new java.io.ObjectOutputStream byte-out)]
> (try (.writeObject o
Hi!
How should I approach serialization? I made a little test function
which serializes and deserializes Clojure objects. It works for
strings, integers, symbols, LazilyPersistentVectors and.. oddly..
PersistentHashMaps that have exactly one element. (My Clojure is about
a month old.)
But for ot
13 matches
Mail list logo