Closed dboris closed 1 year ago
Decode has an uncons function which makes it possible to decode a JSON value like the following:
Decode
uncons
["hello", true, 1]
What is the opposite operation in Encode? How can this value be encoded given an OCaml tuple of type (string bool int)?
You can write
list value [string "hello"; bool true; int 1]
Great. Thank you.
Decode
has anuncons
function which makes it possible to decode a JSON value like the following:What is the opposite operation in Encode? How can this value be encoded given an OCaml tuple of type (string bool int)?