semgrep/atd — explained in plain English
Analysis updated 2026-07-27 · repo last pushed 2023-07-10
Generate JSON parsing code for a mobile app with Android, backend, and data analysis teams sharing one spec.
Keep API data models in sync across Java, Python, Scala, and OCaml by regenerating from a single definition file.
Catch malformed JSON automatically with generated validators instead of debugging at runtime.
Maintain one source of truth for data structures across multiple client platforms.
| semgrep/atd | bracevac/eff | tonistiigi/datakit | |
|---|---|---|---|
| Language | OCaml | OCaml | OCaml |
| Last pushed | 2023-07-10 | 2016-12-02 | 2018-10-01 |
| Maintenance | Dormant | Dormant | Dormant |
| Setup difficulty | moderate | moderate | hard |
| Complexity | 2/5 | 4/5 | 4/5 |
| Audience | developer | researcher | ops devops |
Figures from each repo's GitHub metadata at analysis time.
Requires installing OCaml and the relevant ATD generator (atdj, atdpy, atds, or atdgen) for each target language.
ATD (Adaptable Type Definitions) solves a common headache when building software that communicates via JSON APIs: keeping data definitions consistent across different programming languages. Instead of manually writing and maintaining separate data models in Java, Python, Scala, and OCaml, you write a single type definition once and let ATD generate the appropriate code for each language. You write a specification describing your data structures, what fields they have, what types those fields are, and which are optional. Then you run one of ATD's code generators (atdj for Java, atdpy for Python, atds for Scala, atdgen for OCaml) and get back ready-to-use code that can convert JSON data into native objects in that language. It also generates validators, so if the incoming JSON is missing a required field or has the wrong type, you catch it automatically rather than discovering the problem at runtime in production. This tool fits teams building APIs consumed by multiple client platforms. Say you're shipping a mobile app with an Android frontend in Java, a backend in Scala, and some data analysis in Python. Rather than having each team hand-code their own JSON parsing logic and inevitably drift apart as the API evolves, you maintain one shared definition file as the source of truth. Change the spec, regenerate the code in each language, and every platform stays in sync. The project started in 2010 and has attracted a long list of contributors over the years. The README doesn't go into detail about specific performance characteristics or design tradeoffs, pointing readers to external documentation for that. The tools are distributed under a BSD license, making them suitable for both open-source and commercial use.
ATD lets you write one data-type definition and automatically generate ready-to-use JSON parsing code for Java, Python, Scala, and OCaml, so every platform stays in sync without hand-coding.
Mainly OCaml. The stack also includes OCaml, Java, Python.
Dormant — no commits in 2+ years (last push 2023-07-10).
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.
Setup difficulty is rated moderate, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
double-check against the repo, no cap.