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

ppx_protocol_conv-5.2.2.tbz
sha256=994362c2185d12f732e522e1e457b7de67745e594b898368c878424e93f84587
sha512=237b236a257f35ad671194f6ee0690dfc85eef9b088a928e7b0582b23b5acc19b6727318be6b7abfa0f6c1052047b820e7a0345d8cadb3c0280e18dc3da6e453

doc/ppx_protocol_conv.driver/Ppx_protocol_driver/Default_parameters/index.html

Module Ppx_protocol_driver.Default_parametersSource

Set of default Parameters

Sourceval field_name : string -> string

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

Default is identity

Sourceval variant_name : string -> string

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

Default is identity

Sourceval 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

Sourceval 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

Sourceval 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

Sourceval strict : bool

Fail if unknown fields are encountered when deserialising records.

Default is false

OCaml

Innovation. Community. Security.