Json with embedded Spel expressions utilities.
val skip_user_input : bool ‑> Wcs_t.json_spel
skip_user_input b
creates the JSON object { "skip_user_input" : b }
.
val set_skip_user_input : Wcs_t.json_spel ‑> bool ‑> Wcs_t.json_spel
set_skip_user_input ctx b
set the field "skip_user_input"
of
the object ctx
with value b
.
val take_skip_user_input : Wcs_t.json_spel ‑> Wcs_t.json_spel * bool
take_skip_user_input ctx
take the field "skip_user_input"
of
the object ctx
. If the field is the defined, it returns false
.
"actions"
fieldval actions : Wcs_t.action list ‑> Wcs_t.json_spel
actions acts
creates the JSON object { "actions" : acts }
.
val actions_def : Wcs_t.action_def list ‑> Wcs_t.json_spel
actions_def acts
creates the JSON object { "actions" : acts }
.
val set_actions : Wcs_t.json_spel ‑> Wcs_t.action list ‑> Wcs_t.json_spel
set_actions ctx l
set the field "actions"
of
the object ctx
with the list of actions l
.
val take_actions : Wcs_t.json_spel ‑> Wcs_t.json_spel * Wcs_t.action list option
take_actions ctx
take the field "actions"
of the object
ctx
.
val push_action : Wcs_t.json_spel ‑> Wcs_t.action ‑> Wcs_t.json_spel
push_action ctx act
add the action act
in the list of actions
stored in the field "actions"
of ctx. It the field "actions"
doesn't exists, it creates it.
val pop_action : Wcs_t.json_spel ‑> Wcs_t.json_spel * Wcs_t.action option
pop_action ctx
take an action act
in the list of actions
stored in the field "actions"
of ctx.
"continuation"
fieldval set_continuation : Wcs_t.json_spel ‑> Wcs_t.action ‑> Wcs_t.json_spel
set_continuation ctx act
set the field "continuation"
of
the object ctx
with the action act
.
val get_continuation : Wcs_t.json_spel ‑> Wcs_t.action option
get_continuation ctx
get the value of the field "continuation"
of the object ctx
.
val take_continuation : Wcs_t.json_spel ‑> Wcs_t.json_spel * Wcs_t.action option
take_continuation ctx
take the value of the field "continuation"
of the object ctx
.
"return"
fieldval set_return : Wcs_t.json_spel ‑> Wcs_t.json_spel ‑> Wcs_t.json_spel
set_return ctx v
set the field "return"
of
the object ctx
with the value v
.
val get_return : Wcs_t.json_spel ‑> Wcs_t.json_spel option
get_return ctx
get the value of the field "return"
of the object ctx
.