package ocaml-protoc-plugin

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

Module Ocaml_protoc_plugin.Json_optionsSource

Sourcetype t = {
  1. enum_names : bool;
  2. json_names : bool;
  3. omit_default_values : bool;
}
Sourceval 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.

Sourceval default : t
OCaml

Innovation. Community. Security.