From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.6 required=5.0 tests=AWL,HTML_00_10,HTML_MESSAGE autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id E8516BBAF for ; Sat, 31 May 2008 08:43:44 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnADAFOQQEjAXQIniGdsb2JhbACCNTiPRAEBAQ8gm0M X-IronPort-AV: E=Sophos;i="4.27,570,1204498800"; d="scan'208";a="13003389" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 31 May 2008 08:43:44 +0200 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m4V6hhKv006036 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sat, 31 May 2008 08:43:44 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ag4HAMqQQEjRVciraWdsb2JhbACCNTiPRA0EAwQJDwWbPg X-IronPort-AV: E=Sophos;i="4.27,570,1204498800"; d="scan'208";a="13296187" Received: from wf-out-1314.google.com ([209.85.200.171]) by mail3-smtp-sop.national.inria.fr with ESMTP; 31 May 2008 08:43:43 +0200 Received: by wf-out-1314.google.com with SMTP id 25so177863wfa.0 for ; Fri, 30 May 2008 23:43:41 -0700 (PDT) Received: by 10.143.165.13 with SMTP id s13mr2538971wfo.69.1212216221692; Fri, 30 May 2008 23:43:41 -0700 (PDT) Received: by 10.143.165.3 with HTTP; Fri, 30 May 2008 23:43:40 -0700 (PDT) Message-ID: <28fa90930805302343n18b98b17t72a22ea82539fc6f@mail.gmail.com> Date: Fri, 30 May 2008 23:43:40 -0700 From: "Luca de Alfaro" To: "Inria Ocaml Mailing List" Subject: picking / marshaling to strings in ocaml-revision-stable way MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_899_21107362.1212216221669" X-Miltered: at concorde with ID 4840F39F.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; marshaling:01 ocaml:01 marshaling:01 ocaml:01 unmarshaling:01 unmarshaling:01 tuples:01 tuples:01 marshal:01 marshal:01 strings:01 strings:01 variant:02 variant:02 data:02 ------=_Part_899_21107362.1212216221669 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I need a way to convert data structures to strings, in a way that is robust with respect to different versions of Ocaml. What I need to translate are mostly mixes of tuples, lists and variant types. A typical example of data to marshal/pickle may look like: (3.4, [Move (4, 3, 5); Del (4, 2); Ins (4, 2)], "an example") I heard that the marshaling of the module Marshal is not robust with respect to changes in the version of Ocaml, and since I need to insert the data in a database for long-term use, this is a serious drawback. I need the marshaling and unmarshaling to be completely independent from the version of Ocaml, and from the particular architecture where the marshaling occurs. I could of course write my own solution, but I am wondering if there are any suitable modules available that I could use. Many thanks! Luca ------=_Part_899_21107362.1212216221669 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline I need a way to convert  data structures to strings, in a way that is robust with respect to different versions of Ocaml.
What I need to translate are mostly mixes of tuples, lists and variant types.  A typical example of data to marshal/pickle may look like:

(3.4, [Move (4, 3, 5); Del (4, 2); Ins (4, 2)], "an example")

I heard that the marshaling of the module Marshal is not robust with respect to changes in the version of Ocaml, and since I need to insert the data in a database for long-term use, this is a serious drawback. I need the marshaling and unmarshaling to be completely independent from the version of Ocaml, and from the particular architecture where the marshaling occurs.
I could of course write my own solution, but I am wondering if there are any suitable modules  available that I could use.

Many thanks!

Luca


------=_Part_899_21107362.1212216221669--