Module Jsont.Sort

Sorts of JSON values.

type t =
  1. | Null
    (*

    Nulls

    *)
  2. | Bool
    (*

    Booleans

    *)
  3. | Number
    (*

    Numbers

    *)
  4. | String
    (*

    Strings

    *)
  5. | Array
    (*

    Arrays

    *)
  6. | Object
    (*

    Objects

    *)

The type for sorts of JSON values.

val to_string : t -> string

to_string sort is a string for sort sort.

val pp : Stdlib.Format.formatter -> t -> unit

pp formats sorts.

Kinds

For formatting error messages.

val or_kind : kind:string -> t -> string

or_kind ~kind sort is to_string sort if kind is "" and kind otherwise.

val kinded : kind:string -> t -> string

kinded ~kind sort is to_string sort if kind is "" and String.concat " " [kind; to_string sort] otherwise.

val kinded' : kind:string -> string -> string

kinded' ~kind sort is sort if kind is "" and String.concat " " [kind; sort] otherwise.