ocaml-bitbucket / xjson.mli

open Spotlib.Spot
open Tiny_json

val ocaml_of_t : Json.t Ocaml_conv.encoder
val t_of_ocaml : Json.t Ocaml_conv.decoder
val parse : string -> [> `Error of [> `Json_parse of exn ] | `Ok of Json.t ]

module Error : sig

  val wrap_json_conv : 
    'a Json_conv.decoder 
    -> Json.t 
    ->  ('a, [> `Json_conv of Json.t Meta_conv.Error.t]) Meta_conv.Result.t

  val format : Format.t 
    -> [< `Http of string * int * 'a
       | `Json_conv of Json.t Meta_conv.Error.t
       | `Json_parse of exn
       | `Other of exn ] 
    -> unit

  val from_Ok :
    [< `Error of [< `Http of string * int * 'a
                 | `Json_conv of Json.t Meta_conv.Error.t
                 | `Json_parse of exn
                 | `Other of exn ]
    | `Ok of 'b ] 
    -> 'b
end

val curl_get_and_parse :
  'a Json_conv.decoder 
  -> (Curl.handle -> unit) 
  -> ('a, [> `Http of string * int * string
          | `Json_conv of Json.t Meta_conv.Error.t
          | `Json_parse of exn ]) Meta_conv.Result.t
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.