# mcorest_api_json_read_finish

Finish reading JSON data from the stream.

### For an overview see page mcorest_api_json_read_*

### Prototype

        MCO_RET  mcorest_api_json_read_finish( mcorest_api_json_read_ctx_t *ctx );

### Arguments

ctx | Pointer to the JSON read context structure

### Description

This function finishes reading JSON data from the stream and does sanity checks. No further reads are allowed for this `ctx`.

### Return Codes

MCO_S_OK = 0 | Success
MCO_E_REST_* | Any of the Web Services Error Codes

### Example

        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;
        }

### Files

Header file:
mcorestapi.h
Source file:
jsonrd.c
Library:
libmcorest.a