Finish reading JSON data from the stream.
MCO_RET mcorest_api_json_read_finish( mcorest_api_json_read_ctx_t *ctx );
ctx
This function finishes reading JSON data from the stream and does sanity checks. No further reads are allowed for this ctx.
static MCO_RET get_stream_read_json_object(mcohs_request_h req)
{
mcorest_api_json_read_ctx_t jctx;
mcorest_api_stream_t jstream;
...
mcorest_api_status_ok(req);
mcorest_api_stream_with_request(req, &jstream);
mcorest_api_json_read_start(&jstream, &jctx);
mcorest_api_json_read_next_token(&jctx, MCOREST_API_JSON_TKN_OBJECT_BGN, NULL);
...
mcorest_api_json_read_finish(&jctx);
return MCO_S_OK;
}