package ppx_protocol_conv

  1. Overview
  2. Docs
Ppx for generating serialisation and de-serialisation functions of ocaml types

Install

Dune Dependency

Authors

Maintainers

Sources

5.1.2.tar.gz
md5=b13fbc761c2aa3729b23a1362f140a18
sha512=95d8dabb38d7fe3f7a0ff2b4c17547ec5d2e30c4b83d1f166444ad8fa91ef02ee86ee855ef40bedc86a42ab35b2665a5001af9e2521dc7a648aa8b38c4143765

doc/ppx_protocol_conv.driver/Ppx_protocol_driver/Make/argument-2-P/index.html

Parameter Make.P

val field_name : string -> string

Map field names of records Mapping is done after applying [@key] attribute.

Default is identity

val variant_name : string -> string

Map variant and constructor names. Mapping is done after applying [@name] attribute.

Default is identity

val constructors_without_arguments_as_string : bool

Map constructors with no arguments to a string. If true, constructors without arguments are mapped to a string, instead of than a list containing only the constructor / variant name.

Default is true

val omit_default_values : bool

Omit default values from output. If true, default values are not serialized. Note that this uses polymorphic compare to determine if a field value is the same as the default value.

Default is true

val eager : bool

Lazy evaluate lazy fields. If true, lazy fields are parsed eagerly. If false, lazy fields are parsed first when forced, which means they will hold the serialized structure until forced, and forcing might raise a parse error.

Default is true

val strict : bool

Fail if unknown fields are encountered when deserialising records.

Default is false

OCaml

Innovation. Community. Security.