mongoose/docs/c-api/json-rpc.h/mg_rpc_parse_reply.md
Dmitry Frank 23122b327c Remove old docs, rename docs_new to docs
It would be probably good idea to also remove tools/docgen.py and
asciidoc.mk, but asciidoc.mk is still mentioned under `cloud/doc`, which
may contain some useful info which we'll need at least to review before
removing.

PUBLISHED_FROM=faf454d4c52a2f07ea8ac084cf0bd11a0c9c9b3b
2016-05-15 22:07:04 +03:00

884 B

title decl_name symbol_kind signature
mg_rpc_parse_reply() mg_rpc_parse_reply func int mg_rpc_parse_reply(const char *buf, int len, struct json_token *toks, int max_toks, struct mg_rpc_reply *, struct mg_rpc_error *);

Parse JSON-RPC reply contained in buf, len into JSON tokens array toks, max_toks. If buffer contains valid reply, reply structure is populated. The result of RPC call is located in reply.result. On error, error structure is populated. Returns: the result of calling parse_json(buf, len, toks, max_toks):

On success, an offset inside json_string is returned where parsing has finished. On failure, a negative number is returned, one of:

  • #define JSON_STRING_INVALID -1
  • #define JSON_STRING_INCOMPLETE -2
  • #define JSON_TOKEN_ARRAY_TOO_SMALL -3