OCaml Claude SDK using Eio and Jsont
at main 23 lines 856 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Unknown fields for capturing extra JSON object members. 7 8 This module provides a type and utilities for preserving unknown/extra 9 fields when parsing JSON objects with jsont. Use with 10 [Jsont.Object.keep_unknown] to capture fields not explicitly defined in your 11 codec. *) 12 13type t = Jsont.json 14(** The type of unknown fields - stored as raw JSON. *) 15 16val empty : t 17(** An empty unknown fields value (empty JSON object). *) 18 19val is_empty : t -> bool 20(** [is_empty t] returns [true] if there are no unknown fields. *) 21 22val jsont : t Jsont.t 23(** Codec for unknown fields. *)