package resto

  1. Overview
  2. Docs

An ENCODING is a generic interface for modules that provide conversion from values to a different representation and back. This is used to abstract resto over specific representations of values.

See Resto_json for example of possible instantiation.

type 'a t
type schema
val unit : unit t
val untyped : string t
val conv : ('a -> 'b) -> ('b -> 'a) -> 'b t -> 'a t
val schema : ?definitions_path:string -> 'a t -> schema
val description_request_encoding : Description.request t
val description_answer_encoding : schema Description.directory t