package ocaml-protoc-plugin

  1. Overview
  2. Docs

`Value` represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. A producer of value is expected to set one of these variants. Absence of any variant indicates an error.

The JSON representation for `Value` is JSON value.

type t = [
  1. | `not_set
  2. | `Null_value of NullValue.t
  3. | `Number_value of float
  4. | `String_value of string
  5. | `Bool_value of bool
  6. | `Struct_value of Struct.t
  7. | `List_value of ListValue.t
]
val make : ?kind: [ `not_set | `Null_value of NullValue.t | `Number_value of float | `String_value of string | `Bool_value of bool | `Struct_value of Struct.t | `List_value of ListValue.t ] -> unit -> t

Helper function to generate a message using default values

Serialize the message to binary format

Deserialize from binary format

Serialize to Json (compatible with Yojson.Basic.t)

Deserialize from Json (compatible with Yojson.Basic.t)

val name : unit -> string

Fully qualified protobuf name of this message