package atdgen

  1. Overview
  2. Docs
Generates efficient JSON serializers, deserializers and validators


Dune Dependency






Atdgen is a command-line program that takes as input type definitions in the ATD syntax and produces OCaml code suitable for data serialization and deserialization.

Two data formats are currently supported, these are biniou and JSON. Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the other.

Atdgen was designed with efficiency and durability in mind. Software authors are encouraged to use Atdgen directly and to write tools that may reuse part of Atdgen’s source code.

Published: 17 Jun 2018


ATD project - Static Types for Json APIs

ATD stands for Adaptable Type Definitions. It is a syntax for defining cross-language data types. It is used as input to generate efficient and type-safe serializers, deserializers and validators. The current target languages are OCaml and Java.

The following opam packages are provided by the atd project:

  • atdgen: executable that generates OCaml code dealing with json and biniou data formats

  • atdj: executable that generates Java code dealing with json

  • atd: library for parsing atd files used by code generators

New Documentation | Old Documentation

Help wanted

The ATD suite of tools is developed and maintained by volunteers—users like you. Various issues are in need of attention. If you'd like to contribute, please leave a comment on the issue you're interested in, or create a new issue. Experienced contributors will guide you as needed.

Check out in particular good first time issues and other issues with which we could use some help.

See our contribution guidelines.


The ATD language and atdgen were originally created at MyLife by Martin Jambon in 2010. Atdj was created at MyLife by John Billings in 2010. Multiple volunteers contributed to the project after that. Other prominent contributors include Jeff Meister, David Sheets, and Rudi Grinberg.

We distribute the source code under the terms of a BSD license.


Innovation. Community. Security.