package jsonoo

  1. Overview
  2. Docs
include Ojs.T
type js := Ojs.t
type t
val t_to_js : t -> js
val t_of_js : js -> t
exception Decode_error of string
val try_parse_opt : string -> t option

Try to parse the string into JSON, return Some if successful, None otherwise

val try_parse_exn : string -> t

Try to parse the string into JSON, raise Decode_error if it fails

val stringify : ?spaces:int -> t -> string

Use JSON.stringify to turn JSON into a string. Specify spaces to control the indentation size.

module Decode : sig ... end
module Encode : sig ... end
module type S = sig ... end
module Make (T : Ojs.T) : S with type t = T.t
OCaml

Innovation. Community. Security.