Module jsx

Data Types

config()

config() = jsx_config:config()

decoder()

decoder() = fun((json_text() | end_stream | end_json) -> any())

encoder()

encoder() = fun((json_term() | end_stream | end_json) -> any())

internal_state()

abstract datatype: internal_state()

json_term()

json_term() = [{binary() | atom(), json_term()}] | [{}, ...] | [json_term()] | [] | {with_tail, json_term(), binary()} | #{binary() | atom() => json_term()} | true | false | null | integer() | float() | binary() | atom() | calendar:datetime()

json_text()

json_text() = binary()

parser()

parser() = fun((token() | end_stream) -> any())

token()

token() = [token()] | start_object | end_object | start_array | end_array | {key, binary()} | {string, binary()} | binary() | {number, integer() | float()} | {integer, integer()} | {float, float()} | integer() | float() | {literal, true} | {literal, false} | {literal, null} | true | false | null | end_json

Function Index

consult/1
consult/2
decode/1
decode/2
decoder/3
encode/1
encode/2
encoder/3
format/1
format/2
is_json/1
is_json/2
is_term/1
is_term/2
minify/1
parser/3
prettify/1
resume/3

Function Details

consult/1

consult(File::file:name_all()) -> [jsx_consult:json_value()]

consult/2

consult(File::file:name_all(), Config::jsx_consult:config()) -> [jsx_consult:json_value()]

decode/1

decode(Source::json_text()) -> json_term() | {incomplete, decoder()}

decode/2

decode(Source::json_text(), Config::jsx_config:options()) -> json_term() | {incomplete, decoder()}

decoder/3

decoder(Handler::module(), State::any(), Config::jsx_config:options()) -> decoder()

encode/1

encode(Source::json_term()) -> json_text() | {incomplete, encoder()}

encode/2

encode(Source::json_term(), Config::jsx_config:options()) -> json_text() | {incomplete, encoder()}

encoder/3

encoder(Handler::module(), State::any(), Config::jsx_config:options()) -> encoder()

format/1

format(Source::json_text()) -> json_text()

format/2

format(Source::json_text(), Config::jsx_config:options()) -> json_text()

is_json/1

is_json(Source::binary()) -> boolean() | {incomplete, decoder()}

is_json/2

is_json(Source::binary(), Config::jsx_config:options()) -> boolean() | {incomplete, decoder()}

is_term/1

is_term(Source::json_term() | end_stream | end_json) -> boolean() | {incomplete, encoder()}

is_term/2

is_term(Source::json_term() | end_stream | end_json, Config::jsx_config:options()) -> boolean() | {incomplete, encoder()}

minify/1

minify(Source::json_text()) -> json_text()

parser/3

parser(Handler::module(), State::any(), Config::jsx_config:options()) -> parser()

prettify/1

prettify(Source::json_text()) -> json_text()

resume/3

resume(Term::json_text() | token(), InternalState::internal_state(), Config::jsx_config:options()) -> jsx:decoder() | {incomplete, jsx:decoder()}


Generated by EDoc