package irmin

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Json_tree is used to project JSON values onto trees. Instead of the entire object being stored under one key, it is split across several keys starting at the specified root key.

Parameters

module Store : S with type contents = Contents.json

Signature

include Contents.S with type t = Contents.json

Signature for store contents

type t = Contents.json

The type for user-defined contents.

val t : t Type.t
val merge : t option Merge.t

Merge function. Evaluates to `Conflict msg if the values cannot be merged properly. The arguments of the merge function can take None to mean that the key does not exists for either the least-common ancestor or one of the two merging points. The merge function returns None when the key's value should be deleted.

val to_concrete_tree : t -> Store.Tree.concrete
val of_concrete_tree : Store.Tree.concrete -> t
val get_tree : Store.tree -> Store.key -> t Lwt.t

Extract a json value from tree at the given key.

val set_tree : Store.tree -> Store.key -> t -> Store.tree Lwt.t

Project a json value onto a tree at the given key.

val get : Store.t -> Store.key -> t Lwt.t

Extract a json value from a store at the given key.

val set : Store.t -> Store.key -> t -> info:Info.f -> unit Lwt.t

Project a json value onto a store at the given key.

OCaml

Innovation. Community. Security.