package json-derivers

  1. Overview
  2. Docs
Common Derivers for Jsonm/Yjson

Install

Dune Dependency

Authors

Maintainers

Sources

json-derivers-1.0.0.tbz
sha256=508710498c8482f6f8b6a6373ce03b39e7e2d83702f3c8656f78fc9e336de939
md5=dfdeececf8d34f5ba64e5c4ab2696f24

Description

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 base)

Tags

deriving json

Published: 05 Feb 2018

README

json-derivers

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

Dependencies (3)

  1. base < "v0.15"
  2. jbuilder >= "1.0+beta12"
  3. ocaml >= "4.03.0"

Dev Dependencies

None

Used by (2)

  1. satyrographos < "0.0.2.13"
  2. sentry

Conflicts

None

OCaml

Innovation. Community. Security.