json() = object() | [object()] | binary() | number() | boolean() | null
key() = binary() | atom()
decode/1 | String to internal representation. |
decode_date/1 | Parse binaries as datetimes using iso8601. |
decode_null/1 | Decode 'null' as 'undefined'. |
encode/1 | Internal representation to string. |
encode_date/1 | Format datetimes as binaries using iso8601. |
encode_null/1 | Encode 'undefined' as 'null'. |
error/1 | Format errors as jsons. |
decode(Data::iodata()) -> json()
String to internal representation
decode_date(DateTime::binary()) -> calendar:datetime()
Parse binaries as datetimes using iso8601
To do
decode_null(Json::null) -> undefined
Decode 'null' as 'undefined'. Leave everything else as is.
encode(Json::json()) -> iodata()
Internal representation to string
encode_date(DateTime::calendar:datetime()) -> binary()
Format datetimes as binaries using iso8601
encode_null(Json::undefined) -> null
Encode 'undefined' as 'null'. Leave everything else as is.
error(Error::binary()) -> iodata()
Format errors as jsons.
Given the error Reason, this function returns the json equivalent to
{"error": "Reason"}
.
Generated by EDoc, Sep 12 2016, 12:29:07.