package ocaml-protoc-plugin

  1. Overview
  2. Docs
type t = {
  1. enum_names : bool;
  2. json_names : bool;
  3. omit_default_values : bool;
}
val make : ?enum_names:bool -> ?json_names:bool -> ?omit_default_values:bool -> unit -> t

Create options for json serialization.

If enum_names is true then enums are serialized as strings. If false the integer value is used when serializing.

If json_name is true then serialization will use the json field names. If false, the fields names will be used from the protofile as-is.

If omit_default_values is false then default scalar values will not be emitted to the json. The default is to omit default values.

val default : t
OCaml

Innovation. Community. Security.