package ppx_protocol_conv_json

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

Module Json.MakeSource

Parameters

Signature

Serialized type. This type should not be opaque, so it is recommended that drivers implement the signature as Runtime.Driver with type t = ...

Sourcetype error

Opaque error type

Sourceexception Protocol_error of error

Exception for protocol errors. The driver should make sure that this is the only exception raised when deserializing

Sourceval make_error : ?value:t -> string -> error

Construct an error to be raised from a custom parser.

Sourceval error_to_string_hum : error -> string

Convert an error type to a human readable string

Sourceval to_string_hum : t -> string

Convert t to a string

Sourceval try_with : (t -> 'v) -> t -> ('v, error) Protocol_conv.Runtime.result

Wrap deserialization function to convert exceptions into an result type

Sourceval to_variant : (t, 'a) Protocol_conv.Runtime.Variant_in.t list -> t -> 'a
Sourceval of_variant : string -> (t, 'a, t) Protocol_conv.Runtime.Tuple_out.t -> 'a
Sourceval to_record : (t, 'constr, 'b) Protocol_conv.Runtime.Record_in.t -> 'constr -> t -> 'b
Sourceval of_record : (t, 'a, t) Protocol_conv.Runtime.Record_out.t -> 'a
Sourceval to_tuple : (t, 'constr, 'b) Protocol_conv.Runtime.Tuple_in.t -> 'constr -> t -> 'b
Sourceval of_tuple : (t, 'a, t) Protocol_conv.Runtime.Tuple_out.t -> 'a
Sourceval to_option : (t -> 'a) -> t -> 'a option
Sourceval of_option : ('a -> t) -> 'a option -> t
Sourceval to_ref : (t -> 'a) -> t -> 'a ref
Sourceval of_ref : ('a -> t) -> 'a ref -> t
Sourceval to_list : (t -> 'a) -> t -> 'a list
Sourceval of_list : ('a -> t) -> 'a list -> t
Sourceval to_array : (t -> 'a) -> t -> 'a array
Sourceval of_array : ('a -> t) -> 'a array -> t
Sourceval to_lazy_t : (t -> 'a) -> t -> 'a lazy_t
Sourceval of_lazy_t : ('a -> t) -> 'a lazy_t -> t
Sourceval to_result : (t -> 'a) -> (t -> 'b) -> t -> ('a, 'b) Protocol_conv.Runtime.result
Sourceval of_result : ('a -> t) -> ('b -> t) -> ('a, 'b) Protocol_conv.Runtime.result -> t
Sourceval to_int : t -> int
Sourceval of_int : int -> t
Sourceval to_int32 : t -> int32
Sourceval of_int32 : int32 -> t
Sourceval to_int64 : t -> int64
Sourceval of_int64 : int64 -> t
Sourceval to_nativeint : t -> nativeint
Sourceval of_nativeint : nativeint -> t
Sourceval to_char : t -> char
Sourceval of_char : char -> t
Sourceval to_string : t -> string
Sourceval of_string : string -> t
Sourceval to_float : t -> float
Sourceval of_float : float -> t
Sourceval to_bool : t -> bool
Sourceval of_bool : bool -> t
Sourceval to_bytes : t -> bytes
Sourceval of_bytes : bytes -> t
Sourceval to_unit : t -> unit
Sourceval of_unit : unit -> t
OCaml

Innovation. Community. Security.