Syntax extension that translate ocaml type to json, and vice versa