Debian Codegraph @

vendor/opam/src/core/opamJson.mli

raw
1 (**************************************************************************)
2 (* *)
3 (* Copyright 2012-2019 OCamlPro *)
4 (* *)
5 (* All rights reserved. This file is distributed under the terms of the *)
6 (* GNU Lesser General Public License version 2.1, with the special *)
7 (* exception on linking described in the file LICENSE. *)
8 (* *)
9 (**************************************************************************)
10
11 (** Json encoder; only needed for some debug options
12
13 {b Warning.} Assumes given strings are UTF-8 encoded this is
14 not checked by the module. *)
15
16 type t =
17 [ `Null | `Bool of bool | `Float of float| `String of string
18 | `A of t list | `O of (string * t) list ]
19
20 type 'a encoder = 'a -> t
21 type 'a decoder = t -> 'a option
22
23 val append: string -> t -> unit
24
25 val flush: out_channel -> unit
26
27 val to_string : ?minify:bool -> t -> string
28
29 val of_string: ?encoding:'a -> string -> t option