My agentic slop goes here. Not intended for anyone else!
1(** Unknown fields for capturing extra JSON object members.
2
3 This module provides a type and utilities for preserving unknown/extra
4 fields when parsing JSON objects with jsont. Use with
5 [Jsont.Object.keep_unknown] to capture fields not explicitly defined
6 in your codec. *)
7
8type t = Jsont.json
9(** The type of unknown fields - stored as raw JSON. *)
10
11let empty = Jsont.Object ([], Jsont.Meta.none)
12(** An empty unknown fields value (empty JSON object). *)
13
14let is_empty = function
15 | Jsont.Object ([], _) -> true
16 | _ -> false
17(** [is_empty t] returns [true] if there are no unknown fields. *)
18
19let jsont = Jsont.json
20(** Codec for unknown fields. *)