caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] cconv-0.2
@ 2014-12-01  9:44 Simon Cruanes
  2014-12-01 10:15 ` Thomas Gazagnaire
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Cruanes @ 2014-12-01  9:44 UTC (permalink / raw)
  To: OCaml users

[-- Attachment #1: Type: text/plain, Size: 1861 bytes --]

Hi everyone,

I'm happy to announce the release of cconv 0.2 [1]. CConv is a
BSD-licensed combinators library for serializing and unserializing data
structures.  It particularity is that it doesn't target a specific
serialization format, but any format that is expressive enough (using
some type machinery involving a few GADTs and visitor patterns).

The rationale is that, for library writers, the current go-to practice
to provide some serialization support is to use type_conv and "with sexp".
This requires camlp4 and a lot of libraries, and forces the choice of
S-expressions on the user. Instead, by providing CConv encoders and
decoders, the user could choose which serialization format (even simple
printing) to use by herself.

To serialize values of type 'a, one can write a value of type ['a
CConv.Encode.encoder] that can be used with any serialization backend;
to unserialize, it's a value of type ['a CConv.Decode.decoder].
Then, cconv ships with three (optional) backends, to Yojson, Bencode and
Sexplib; an ['a encoder] can be used with any of those three (same for
decoders). See the readme [2] for more details.

There will be a ppx_deriving [3] instance [4] soon for automatically
generating decoders and encoders based on types.

If anyone used cconv-0.1, I apologize for the change of interface. The
ideas took time to evolve...

As usual, bug reports, comments, criticism and accusations of
reinventing the wheel are all welcome.

Cheers,

-- 
Simon

[1] https://github.com/c-cube/cconv/tree/0.2
[2] https://github.com/c-cube/cconv/blob/0.2/README.md#usage
[3] https://github.com/whitequark/ppx_deriving
[4] https://github.com/c-cube/ppx_deriving_cconv (work in progress, comments appreciated!)

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-01 13:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-01  9:44 [Caml-list] [ANN] cconv-0.2 Simon Cruanes
2014-12-01 10:15 ` Thomas Gazagnaire
2014-12-01 10:52   ` Simon Cruanes
2014-12-01 13:00     ` Simon Cruanes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).