···130130 |> C.Object.seal
131131 ]} *)
132132133133+ (** {1:core Core types and diagnostics} *)
134134+133135 type 'a t = 'a Codec.t
134136 (** The type of codecs mapping JSON values to OCaml values of type ['a]. *)
135137···170172171173 val with_doc : ?kind:string -> ?doc:string -> 'a t -> 'a t
172174 (** [with_doc c] is [c] with updated [kind] and [doc] metadata. *)
175175+176176+ (** {1:scalars Scalar codecs} *)
173177174178 module Base : sig
175179 (** Low-level maps for custom scalar codecs. Most users can start with
···309313310314 val binary_string : string t
311315 (** Binary strings encoded as lower-case hexadecimal JSON strings. *)
316316+317317+ (** {1:arrays Array and tuple codecs} *)
312318313319 module Array : sig
314320 (** Low-level maps for custom JSON array representations. Prefer
···430436 val tn : ?kind:string -> ?doc:string -> n:int -> 'a t -> 'a array t
431437 (** JSON arrays with exactly [n] elements. *)
432438439439+ (** {1:objects Object codecs} *)
440440+433441 module Object : sig
434442 (** Builders for JSON object codecs. *)
435443···593601 (** Ignore JSON objects on decoding and encode an empty object. *)
594602 end
595603604604+ (** {1:mapping Choice, mapping, and recursion} *)
605605+596606 val any :
597607 ?kind:string ->
598608 ?doc:string ->
···635645636646 val zero : unit t
637647 (** Decode any JSON value to [()] and encode JSON null. *)
648648+649649+ (** {1:generic Generic AST codecs} *)
638650639651 module Value : sig
640652 (** Codecs for the generic {!Json.t} AST. *)
···664676 (** Generic object members as an unknown-member map. *)
665677 end
666678679679+ (** {1:queries Query and update codecs} *)
680680+667681 val const : 'a t -> 'a -> 'a t
668682 (** Decode any JSON value to a constant and encode that constant with [c]. *)
669683···735749736750 val delete_path : ?allow_absent:bool -> Path.t -> value t
737751 (** Delete the value selected by a path. *)
752752+753753+ (** {1:runtime Runtime over {!Json.t}} *)
738754739755 val decode : 'a t -> value -> ('a, Error.t) result
740756 (** Apply a codec to an existing {!Json.t}. *)
···844860 This is the AST layer for callers who need to keep, inspect, or construct
845861 arbitrary JSON data. Prefer {!module-Json.Codec} when JSON should map
846862 directly to ordinary OCaml values. *)
863863+864864+ (** {1:core Core JSON value types} *)
847865848866 module Meta = Loc.Meta
849867 (** JSON node metadata. *)
···889907 val equal : t -> t -> bool
890908 (** [equal a b] is [compare a b = 0]. *)
891909910910+ (** {1:construct Constructors} *)
911911+892912 val null : unit cons
893913 (** JSON null. *)
894914···946966 val member : name -> t -> member
947967 (** [member n v] binds member name [n] to value [v]. *)
948968969969+ (** {1:members Object-member queries} *)
970970+949971 val member_key : string -> member list -> member option
950972 (** [member_key k mems] is the first member in [mems] whose key is [k], if
951973 any. *)
···958980959981 val zero : ?meta:Meta.t -> t -> t
960982 (** The natural zero for a value's JSON sort. *)
983983+984984+ (** {1:printing Pretty-printing} *)
961985962986 val pp_null : unit Fmt.t
963987 (** Print JSON null. *)