package frama-c

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

Module Server.JbufferSource

Rich text buffers with JSON marshalling.

Sourceval format : ?indent:int -> ?margin:int -> ('a, Format.formatter, unit, json) format4 -> 'a

All-in-one formatter. Return the JSON encoding of formatted text.

Sourceval to_json : ?indent:int -> ?margin:int -> (Format.formatter -> 'a -> unit) -> 'a -> json

All-in-one formatter. Return the JSON encoding of formatted text.

Sourcetype buffer

Buffer for encoding formatted text.

Sourceval create : ?indent:int -> ?margin:int -> unit -> buffer

Create 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.

Sourceval formatter : buffer -> Format.formatter

The underlying formatter of a buffer.

Sourceval bprintf : buffer -> ('a, Format.formatter, unit) format -> 'a

Prints into the buffer formatter.

Sourceval append : buffer -> string -> int -> int -> unit
Sourceval flush : buffer -> unit -> unit
Sourceval push_tag : buffer -> Format.stag -> unit
Sourceval pop_tag : buffer -> Format.stag -> unit
Sourceval contents : buffer -> json

Flushes the buffer and returns its JSON enoding. This pops all pending tags.

Sourceval is_empty : json -> bool

When is_empty js holds, the JSON is sure to be empty.

Sourceval fprintf : Format.formatter -> json -> unit

Prints back a JSON encoding into the provided formatter.

  • raises Yojson.Basic.Util.Type_error

    in case of ill formatted buffer.

OCaml

Innovation. Community. Security.