package jsont

  1. Overview
  2. Docs

Module Object.MemSource

Member maps.

Usually it's better to use Jsont.Object.mem or Jsont.Object.opt_mem directly. But this may be useful in certain abstraction contexts.

Sourcetype ('o, 'dec) object_map := ('o, 'dec) map
Sourcetype ('o, 'a) map

The type for mapping a member object to a value 'a stored in an OCaml value of type 'o.

Sourceval map : ?doc:string -> ?dec_absent:'a -> ?enc:('o -> 'a) -> ?enc_omit:('a -> bool) -> string -> 'a t -> ('o, 'a) map
Sourceval app : ('o, 'a -> 'b) object_map -> ('o, 'a) map -> ('o, 'b) object_map

app map mmap applies the member map mmap to the contructor of the object map map. In turn this adds the mmap member definition to the object described by map.