OCaml Claude SDK using Eio and Jsont
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 24 lines 903 B view raw
1(*--------------------------------------------------------------------------- 2 Copyright (c) 2025 Anil Madhavapeddy <anil@recoil.org>. All rights reserved. 3 SPDX-License-Identifier: ISC 4 ---------------------------------------------------------------------------*) 5 6(** Helper functions for JSON operations in examples using json codecs. *) 7 8val to_string : ?minify:bool -> Json.t -> string 9(** Encode JSON to string. *) 10 11val string : Json.t -> string -> string option 12(** [string json key] extracts a string field. *) 13 14val int : Json.t -> string -> int option 15(** [int json key] extracts an integer field. *) 16 17val bool : Json.t -> string -> bool option 18(** [bool json key] extracts a boolean field. *) 19 20val array : Json.t -> string -> Json.t list option 21(** [array json key] extracts an array field. *) 22 23val as_string : Json.t -> string option 24(** [as_string json] decodes JSON as a string value. *)