size_t Jobs_GetJobDocument()

in source/jobs.c [986:1007]


size_t Jobs_GetJobDocument( const char * message,
                            size_t messageLength,
                            const char ** jobDoc )
{
    size_t jobDocLength = 0U;
    JSONStatus_t jsonResult = JSONNotFound;

    jsonResult = JSON_Validate( message, messageLength );

    if( jsonResult == JSONSuccess )
    {
        jsonResult = JSON_SearchConst( message,
                                       messageLength,
                                       "execution.jobDocument",
                                       CONST_STRLEN( "execution.jobDocument" ),
                                       jobDoc,
                                       &jobDocLength,
                                       NULL );
    }

    return jobDocLength;
}