Skip to content

Latest commit

 

History

History
122 lines (57 loc) · 3.61 KB

ubf_jsonrpc.md

File metadata and controls

122 lines (57 loc) · 3.61 KB

Module ubf_jsonrpc

Function Index

rpc_v11_req_decode/3
rpc_v11_req_decode/4
rpc_v11_req_decode_print/3
rpc_v11_req_encode/3
rpc_v11_req_encode/4

Take an Erlang RPC term (atom or tuple, where 1st element of the tuple is the RPC function to call) and extract the AuthInfo (if SubstAuthInfoP is true) and encode the call atom/tuple as an intermediate representation of a JSON object.

The intermediate _JSON object needs to be string-ified before it\'s
really a JSON thing, because JSON things are strings.
See EUnit test module ubf_jsonrpc_examples_test.erl for example
usage.

.

rpc_v11_req_encode_print/3
rpc_v11_res_decode/2
rpc_v11_res_decode_print/2
rpc_v11_res_encode/4
rpc_v11_res_encode_print/4

Function Details

rpc_v11_req_decode/3

rpc_v11_req_decode(AuthInfo, X, UBFMod) -> any()

rpc_v11_req_decode/4

rpc_v11_req_decode(AuthInfo, X, UBFMod, SubstAuthInfoP) -> any()

rpc_v11_req_decode_print/3

rpc_v11_req_decode_print(AuthInfo, X, UBFMod) -> any()

rpc_v11_req_encode/3

rpc_v11_req_encode(Request, Id, UBFMod) -> any()

rpc_v11_req_encode/4


rpc_v11_req_encode(Method::atom() | tuple(), Id::binary(), UBFMod::atom(), SubstAuthInfoP::boolean()) -> {undefined | term(), encoded_json_term()}



Take an Erlang RPC term (atom or tuple, where 1st element of the tuple is the RPC function to call) and extract the AuthInfo (if SubstAuthInfoP is true) and encode the call atom/tuple as an intermediate representation of a JSON object.

The intermediate _JSON object needs to be string-ified before it\'s
really a JSON thing, because JSON things are strings.
See EUnit test module ubf_jsonrpc_examples_test.erl for example
usage.

rpc_v11_req_encode_print/3

rpc_v11_req_encode_print(X, Id, UBFMod) -> any()

rpc_v11_res_decode/2

rpc_v11_res_decode(X, UBFMod) -> any()

rpc_v11_res_decode_print/2

rpc_v11_res_decode_print(X, UBFMod) -> any()

rpc_v11_res_encode/4

rpc_v11_res_encode(X, Y, Id, UBFMod) -> any()

rpc_v11_res_encode_print/4

rpc_v11_res_encode_print(X, Y, Id, UBFMod) -> any()