From: Martin Jambon <martin.jambon@ens-lyon.org>
To: caml-list@inria.fr
Subject: Announcing json-static: syntax magic for JSON
Date: Sat, 20 Jan 2007 19:00:25 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.64.0701201832550.15008@droopy> (raw)
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
reply other threads:[~2007-01-21 3:00 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.64.0701201832550.15008@droopy \
--to=martin.jambon@ens-lyon.org \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).