OCaml let rec x = Json_encoder.y printer.
Primitive and reference types are never on the LHS of an equation. Instead, they are expanded when used on the RHS of an equation.
A nested compound type is fully printed on the RHS of an equation.
val singletons_of_array :
len:int ->
[ `List of
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a
| `Singleton of 'a ]
list ->
'a listval splat :
Restapis_o.Open__.Ezjsonm.value ->
(string * Restapis_o.Open__.Ezjsonm.value option) listval json_to_string :
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a ->
Restapis_o.Open__.Ezjsonm.value ->
stringval string_to_json :
p:string ->
sep:char ->
inner_sep:char ->
value_sep:char option ->
leading:bool ->
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a ->
string ->
Restapis_o.Open__.Ezjsonm.value option * intval json_to_form :
string ->
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a ->
Restapis_o.Open__.Ezjsonm.value ->
string listval string_to_best_json_choice :
p:string ->
sep:char ->
inner_sep:char ->
value_sep:char option ->
leading:bool ->
kindchoices:
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a
list ->
string ->
Restapis_o.Open__.Ezjsonm.value option * intval nvs_to_json :
kind:
[ `Any
| `Array of [ `List of 'a | `Singleton of 'a ] list
| `Boolean
| `Choice of 'a list
| `Integer
| `Null
| `Number
| `ObjectN of (string * 'a) list
| `String ] as 'a ->
p:[ `None | `Deep of string | `Shallow of string ] ->
sep:char ->
inner_sep:char ->
value_sep:char option ->
leading:bool ->
(string * string) list ->
Restapis_o.Open__.Ezjsonm.value optionnvs_to_json ~kind ~p ~sep ~inner_sep ~leading nvs takes the name value pairs nvs and attempts to convert them to a JSON object of kind kind.
When p = None, all the name value pairs are considered. That mode is good for decoding forms.
When p = Some propname, only the name value pairs that use the property name propname are considered. For example, when propname = Some "color" then nvs = [("color", "red"); ("color[]", "blue"), ("color[rgb]", "FFFFFF")] will all be considered.
val query_cookie_header_nvs :
Restapis_o.Open__.Uri.t ->
(string * string) list ->
(string * string) list * (string * string) list * (string * string) listinclude DkCoder_Std.SCRIPT
__init context is the entry point for running a script module. The DkCoder compiler will inject this function at the top and bottom of the script module. The top __init does nothing, while the bottom __init calls the prior __init.
That means:
- calling the
__initfunction guarantees that the script module is initialized; that is, all of the script module's side-effects (ex.let () = Format.printf "Hello world@.") are executed before the__initreturns to the caller. - you can override the
__initfunction by simply defining the__initidempotently. That will shadow the top__initand when the bottom__initis executed your__initwill be called instead of the do-nothing top__init.
Future versions of DkCoder will call __init in dependency order for all `You script modules. Your __init function may be called several times.
__repl context is the entry point for debugging a script module in a REPL. The DkCoder compiler will inject this function at the top and bottom of the script module. The top __repl does nothing, while the bottom __repl calls the prior __repl.
That means:
- you can override the
__replfunction by simply defining the__replidempotently. That will shadow the top__repland when the bottom__replis executed your__replwill be called instead of the do-nothing top__repl.
The run-time module information for the script module.

