package decoders-yojson

  1. Overview
  2. Docs
include Decoders.Decode.S with type value = Yojson.Raw.t
type value = Yojson.Raw.t
type error = value Decoders__.Error.t
val pp_error : Stdlib.Format.formatter -> error -> unit
val string_of_error : error -> string
val of_string : string -> (value, error) Decoders__Sig.result
val of_file : string -> (value, error) Decoders__Sig.result
type !'a decoder = (value, 'a) Decoders__.Decoder.t
val string : string decoder
val int : int decoder
val float : float decoder
val bool : bool decoder
val null : unit decoder
val value : value decoder
val list : 'a decoder -> 'a list decoder
val list_filter : 'a option decoder -> 'a list decoder
val list_fold_left : ('a -> 'a decoder) -> 'a -> 'a decoder
val array : 'a decoder -> 'a array decoder
val index : int -> 'a decoder -> 'a decoder
val uncons : ('a -> 'b decoder) -> 'a decoder -> 'b decoder
val field : string -> 'a decoder -> 'a decoder
val field_opt : string -> 'a decoder -> 'a option decoder
val field_opt_or : default:'a -> string -> 'a decoder -> 'a decoder
val single_field : (string -> 'a decoder) -> 'a decoder
val at : string list -> 'a decoder -> 'a decoder
val maybe : 'a decoder -> 'a option decoder
val nullable : 'a decoder -> 'a option decoder
val one_of : (string * 'a decoder) list -> 'a decoder
val pick : (string * 'a decoder decoder) list -> 'a decoder
val decode_sub : value -> 'a decoder -> 'a decoder
val map : ('a -> 'b) -> 'a decoder -> 'b decoder
val apply : ('a -> 'b) decoder -> 'a decoder -> 'b decoder
val keys : string list decoder
val key_value_pairs : 'v decoder -> (string * 'v) list decoder
val key_value_pairs_seq : (string -> 'v decoder) -> 'v list decoder
val keys' : 'k decoder -> 'k list decoder
val key_value_pairs' : 'k decoder -> 'v decoder -> ('k * 'v) list decoder
val key_value_pairs_seq' : 'k decoder -> ('k -> 'v decoder) -> 'v list decoder
val succeed : 'a -> 'a decoder
val fail : string -> 'a decoder
val fail_with : error -> 'a decoder
val from_result : ('a, error) Decoders__Sig.result -> 'a decoder
val and_then : ('a -> 'b decoder) -> 'a decoder -> 'b decoder
val fix : ('a decoder -> 'a decoder) -> 'a decoder
val of_of_string : msg:string -> (string -> 'a option) -> 'a decoder
module Infix : sig ... end
val (>>=) : ('i, 'a) Decoders__Decoder.t -> ('a -> ('i, 'b) Decoders__Decoder.t) -> ('i, 'b) Decoders__Decoder.t
val (>|=) : ('i, 'a) Decoders__Decoder.t -> ('a -> 'b) -> ('i, 'b) Decoders__Decoder.t
val (<*>) : ('i, 'a -> 'b) Decoders__Decoder.t -> ('i, 'a) Decoders__Decoder.t -> ('i, 'b) Decoders__Decoder.t
type (!'i, !'o) t_let = ('i, 'o) Decoders__Decoder.t
val let+ : ('i, 'a) t_let -> ('a -> 'b) -> ('i, 'b) t_let
val and+ : ('i, 'a) t_let -> ('i, 'b) t_let -> ('i, 'a * 'b) t_let
val let* : ('i, 'a) t_let -> ('a -> ('i, 'b) t_let) -> ('i, 'b) t_let
val and* : ('i, 'a) t_let -> ('i, 'b) t_let -> ('i, 'a * 'b) t_let
val (<$>) : ('a -> 'b) -> 'a decoder -> 'b decoder
val decode_value : 'a decoder -> value -> ('a, error) Decoders__Sig.result
val decode_string : 'a decoder -> string -> ('a, error) Decoders__Sig.result
val decode_file : 'a decoder -> string -> ('a, error) Decoders__Sig.result
module Pipeline : sig ... end

Yojson.Raw-specific decoders

val stringlit : string decoder
val intlit : string decoder
val floatlit : string decoder
OCaml

Innovation. Community. Security.