Module Bcfg_json

A small, dependency-free JSON view of a bcfg configuration, useful to pipe a query result into tools such as jq.

Mapping

A configuration (a list of directives) becomes a JSON object mapping every directive name to its value. The value of a directive is:

Directives sharing the same name (e.g. repeated entries) are grouped into a JSON array, in their order of appearance.

type t = [
  1. | `Null
  2. | `Bool of bool
  3. | `String of string
  4. | `List of t list
  5. | `Assoc of (string * t) list
]
val of_config : Bcfg.t -> t
val to_string : ?minify:bool -> t -> string
val pp : Format.formatter -> t -> unit