package avro-compiler

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
module J = Yojson.Safe
type atomic_type =
  1. | Null
  2. | Bool
  3. | Int32
  4. | Int64
  5. | Float32
  6. | Float64
  7. | Bytes
  8. | String
type top_type =
  1. | Atomic of atomic_type
  2. | Named of string
  3. | Array of top_type
  4. | Str_map of top_type
  5. | Union of top_type list
  6. | Fixed of {
    1. name : string;
    2. namespace : string option;
    3. doc : string option;
    4. size : int;
    }
  7. | Enum of {
    1. name : string;
    2. namespace : string option;
    3. symbols : string list;
    4. doc : string option;
    5. aliases : string list option;
    }
  8. | Record of {
    1. name : string;
    2. namespace : string option;
    3. fields : record_field list;
    4. doc : string option;
    5. aliases : string list option;
    }
and record_field = {
  1. name : string;
  2. doc : string option;
  3. ty : top_type;
}
type t = top_type

A toplevel schema.

val json_of_atomic : atomic_type -> J.t
val to_json : t -> J.t
val json_of_field : record_field -> J.t
val of_json : J.t -> (t, string) result
val pp : Format.formatter -> t -> unit
val to_string : t -> string
val parse_string : string -> (t, string) result
val parse_file : string -> (t, string) result
OCaml

Innovation. Community. Security.