Frama-C API - Jbuffer
Rich text buffers with JSON marshalling.
type json = Frama_c_kernel.Json.tval format : ?indent:int -> ?margin:int -> ('a, Stdlib.Format.formatter, unit, json) Stdlib.format4 -> 'aAll-in-one formatter. Return the JSON encoding of formatted text.
val to_json : ?indent:int -> ?margin:int -> (Stdlib.Format.formatter -> 'a -> unit) -> 'a -> jsonAll-in-one formatter. Return the JSON encoding of formatted text.
val create : ?indent:int -> ?margin:int -> unit -> bufferCreate a formatter with ~indent maximum indentation and ~margin right-margin. Defaults are those of Format.make_formatter, which are ~indent:68 and ~margin:78 with OCaml 4.05.
val formatter : buffer -> Stdlib.Format.formatterThe underlying formatter of a buffer.
val bprintf : buffer -> ('a, Stdlib.Format.formatter, unit) Stdlib.format -> 'aPrints into the buffer formatter.
val append : buffer -> string -> int -> int -> unitval flush : buffer -> unit -> unitval push_tag : buffer -> Stdlib.Format.stag -> unitval pop_tag : buffer -> Stdlib.Format.stag -> unitFlushes the buffer and returns its JSON enoding. This pops all pending tags.
val is_empty : json -> boolWhen is_empty js holds, the JSON is sure to be empty.
val fprintf : Stdlib.Format.formatter -> json -> unitPrints back a JSON encoding into the provided formatter.
