json-derivers

Common Derivers for Jsonm/Yjson
README

This library provides comparison, hashing, and sexp conversion functions for the
Yojson.Safe.t and
Ezjsonm.t types with a minimal amount of
dependencies (only https://github.com/janestreet/base):

Json_derivers.Yojson

type t =
  [ `Assoc of (string * t) list
  | `Bool of bool
  | `Float of float
  | `Int of int
  | `Intlit of string
  | `List of t list
  | `Null
  | `String of string
  | `Tuple of t list
  | `Variant of string * t option ]

val sexp_of_t : t -> Base.Sexp.t
val t_of_sexp : Base.Sexp.t -> t
val compare : t -> t -> int
val hash : t -> int

Json_derivers.Jsonm

type value =
  [ `Null
  | `Bool of bool
  | `Float of float
  | `String of string
  | `A of value list
  | `O of (string * value) list ]

val sexp_of_value : value -> Base.Sexp.t
val value_of_sexp : Base.Sexp.t -> value
val compare : value -> value -> int
val hash : value -> int

type t =
  [ `A of value list
  | `O of (string * value) list ]

val sexp_of_t : t -> Base.Sexp.t
val t_of_sexp : Base.Sexp.t -> t
val compare : t -> t -> int
val hash : t -> int
Install
Sources
json-derivers-1.0.0.tbz
md5=dfdeececf8d34f5ba64e5c4ab2696f24
Dependencies
base
< "v0.15"
jbuilder
>= "1.0+beta12"
ocaml
>= "4.03.0"
Reverse Dependencies