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.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0E534BC0A for ; Sun, 21 Jan 2007 04:00:43 +0100 (CET) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0L30Z1K012097 for ; Sun, 21 Jan 2007 04:00:42 +0100 Received: from out1.internal (unknown [10.202.2.149]) by out1.messagingengine.com (Postfix) with ESMTP id 0D1F38F74A for ; Sat, 20 Jan 2007 22:00:35 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by out1.internal (MEProxy); Sat, 20 Jan 2007 22:00:35 -0500 X-Sasl-enc: NJ+KqwPHeOng/I3h7PSqXapde6HttP3CDIViLfN4oBVE 1169348433 Received: from adsl-75-3-200-60.dsl.sndg02.sbcglobal.net (adsl-75-3-200-60.dsl.sndg02.sbcglobal.net [75.3.200.60]) by mail.messagingengine.com (Postfix) with ESMTP id C12261C2D7 for ; Sat, 20 Jan 2007 22:00:33 -0500 (EST) Date: Sat, 20 Jan 2007 19:00:25 -0800 (PST) From: Martin Jambon X-X-Sender: martin@droopy To: caml-list@inria.fr Subject: Announcing json-static: syntax magic for JSON Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at concorde with ID 45B2D753.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ens-lyon:01 syntax:01 syntax:01 notation:01 defines:01 val:01 val:01 javascript:98 javascript:98 functions:01 jambon:01 jambon:01 data:02 data:02 defined:02 Hello, I am releasing a syntax extension which translates quasi-OCaml type definitions into converters from/to generic JSON data: http://martin.jambon.free.fr/json-static.html (version 0.9.0, BSD license) JSON (JavaScript Object Notation) is a language-neutral data format, which is readily available in JavaScript, but also for many other programming languages thanks to its simplicity. This tool uses the json-wheel library that Mika Illouz and myself released a few weeks ago. Using the json-static facility is not mandatory at all, but it can be a timesaver. For example, the following declaration defines the type of a point object: type json point = < x: float; y: float > This automatically makes two functions available, with the following signature: val json_of_point : point -> Json_type.t val point_of_json : Json_type.t -> point Json_type.t is the type of any JSON data, as defined by the json-wheel library. A typical use of this library is illustrated by an HTTP client that queries a web service which returns JSON data. There is an example of a program that queries Yahoo!'s JSON web service: http://martin.jambon.free.fr/yahoo.ml.html Martin -- Martin Jambon http://martin.jambon.free.fr