package wtr

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

All user defined decoders conform to the module signature decoder.

For e.g.

module Fruit = struct
  type t =
    | Apple
    | Orange
    | Pineapple

  let t : t Wtr.decoder =
    Wtr.create_decoder ~name:"fruit" ~decode:(function
      | "apple" -> Some Apple
      | "orange" -> Some Orange
      | "pineapple" -> Some Pineapple
      | _ -> None)
end
type t
val t : t decoder
OCaml

Innovation. Community. Security.