Encode
bool
RESCRIPT
let bool: bool => tnull
RESCRIPT
let null: tstring
RESCRIPT
let string: string => tint
RESCRIPT
let int: int => tfloat
RESCRIPT
let float: float => tobject
RESCRIPT
let object: Core__Dict.t<t> => tReturns 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