genericserialize

Serialization library using Data.Generics

Latest on Hackage:0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD3 licensed by Stefan O'Rear
Maintained by Stefan O'Rear
This is genericserialize, a library of functions using the "Scrap your
boilerplate" framework to serialize arbitrary data.

Basic usage:

*Data.Generics.Serialization.SExp> buildList (sexpSerialize (True,False))
"(~l,~r #t #f)"
*Data.Generics.Serialization.SExp> buildList (sexpSerialize [True,False])
"(#t #f)"
*Data.Generics.Serialization.SExp> buildList (sexpSerialize (Just "help"))
"(Just \"help\")"
*Data.Generics.Serialization.SExp> withList (sexpDeserialize) "(#t #f)" :: Maybe [Bool]
Just [True,False]
*Data.Generics.Serialization.SExp> withList (sexpDeserialize) "(Just \"f\\oo\")" :: Maybe (Maybe Bool)
Nothing
*Data.Generics.Serialization.SExp> withList (sexpDeserialize) "(Just \"f\\oo\")" :: Maybe (Maybe String)
Just (Just "foo")
*Data.Generics.Serialization.SExp>
Depends on:
Used by 1 package:
comments powered byDisqus