Module CConv

module CConv: sig .. end

Bidirectional Conversion

exception ConversionFailure of string
type 'a sequence = ('a -> unit) -> unit 
val report_error : ('a, Buffer.t, unit, 'b) Pervasives.format4 -> 'a
Helper to report conversion errors.
Raises ConversionFailure if the conversion failed (!)


Helps encoding values into a serialization format (building values of some type 'a, such as a JSON tree)

module Encode: sig .. end
module Decode: sig .. end
type 'a or_error = [ `Error of string | `Ok of 'a ] 
val encode : 'src Encode.encoder -> 'into -> 'src -> 'into
Encode a value into the serialization format 'into
val to_string : 'src Encode.encoder -> 'src -> string
Use CConv.Encode.string_target to print the value
val decode_exn : 'src Decode.source -> 'into Decode.decoder -> 'src -> 'into
Decode a serialized value
val decode : 'src Decode.source ->
'into Decode.decoder -> 'src -> 'into or_error