Encode
bool
RESCRIPT
let bool: bool => t
null
RESCRIPT
let null: t
string
RESCRIPT
let string: string => t
int
RESCRIPT
let int: int => t
float
RESCRIPT
let float: float => t
object
RESCRIPT
let object: Core__Dict.t<t> => t
Returns a dict as a JSON object.
Examples
RESCRIPTlet dict = Dict.fromArray([
("foo", JSON.Encode.string("bar")),
("hello", JSON.Encode.string("world")),
])
JSON.Encode.object(dict)
array
RESCRIPT
let array: array<t> => t