mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-14 10:20:01 +00:00
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
25 lines
884 B
Markdown
25 lines
884 B
Markdown
---
|
|
title: "mg_rpc_parse_reply()"
|
|
decl_name: "mg_rpc_parse_reply"
|
|
symbol_kind: "func"
|
|
signature: |
|
|
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`
|
|
|