[Haskell-cafe] Any generic serializer to String? was: Any
working example of using genericserialize?
bulat.ziganshin at gmail.com
Wed Sep 30 10:07:09 EDT 2009
Wednesday, September 30, 2009, 5:53:37 PM, you wrote:
afaik, SYB just provides gshow/gread functions what serialize any Data
instance to String
> FWIW, writing your own is not hard. I wrote a serializer for GHC using
> Data in less than 150 (simple) LOC. It produces [Word8], but producing
> strings instead would be easy. You can check out the code here:
> 2009/9/30 Dimitry Golubovsky <golubovsky at gmail.com>:
>> On 9/30/09, Jason Dagit <dagit at codersbase.com> wrote:
>>> Seems like using withList is wrong or the deserializer is simply buggy. It
>>> certainly doesn't work the way I would expect SExp reading to work. I also
>>> notice from reading the source on hackage that there may not be any tests
>>> for this package and it is a 0.1 release. I'd contact the author, as it
>>> seems there is a deficiency in the documentation or a bug in the
>> Thanks Jason for trying this. The genericserialize package is probably
>> not finished yet.
>> What else exists that could be used to serialize in generic way (i.
>> e., anything that is an instance of Data and Typeable) into a string?
>> It does not need to be very efficient as structures to be serialized
>> are not huge (but may be pretty complex), and serialization is a part
>> of an utility not to be used frequently. It only needs to "just work".
>> One thing I thought of was to serialize to JSON (there is a generic
>> serializer in one of packages although I did not test it other way)
>> which has higher overhead than S-expressions though.
>> Any other thoughts?
>> Dimitry Golubovsky
>> Anywhere on the Web
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe