Yojson 1.6.0 emits a deprecation warning when using the type Yojson.Safe.json, which is all nice and fine. However atdgen is now unhappy. Please take a look at ahrefs/atd#185
It's an interesting design problem but unfortunately I have no time to devote to this myself.