@@ -359,15 +359,15 @@ container_status (PyObject *self arg_unused, PyObject *args)
359
359
}
360
360
361
361
static int
362
- load_json_file (yajl_val * out , const char * jsondata , struct parser_context * ctx arg_unused , libcrun_error_t * err )
362
+ load_json_file (json_t * out , const char * jsondata , struct parser_context * ctx arg_unused , libcrun_error_t * err )
363
363
{
364
- char errbuf [ 1024 ] ;
364
+ json_error_t * error ;
365
365
366
366
* err = NULL ;
367
367
368
- * out = yajl_tree_parse (jsondata , errbuf , sizeof ( errbuf ) );
368
+ * out = json_loads (jsondata , 0 , error );
369
369
if (* out == NULL )
370
- return libcrun_make_error (err , 0 , "cannot parse the data: `%s`" , errbuf );
370
+ return libcrun_make_error (err , 0 , "cannot parse the data: `%s`" , error -> text );
371
371
372
372
return 0 ;
373
373
}
@@ -380,7 +380,7 @@ container_update (PyObject *self arg_unused, PyObject *args)
380
380
libcrun_context_t * ctx ;
381
381
char * id = NULL ;
382
382
char * content = NULL ;
383
- yajl_val tree = NULL ;
383
+ json_t * tree = NULL ;
384
384
int ret ;
385
385
parser_error parser_err = NULL ;
386
386
struct parser_context parser_ctx = { 0 , stderr };
@@ -393,12 +393,12 @@ container_update (PyObject *self arg_unused, PyObject *args)
393
393
if (ctx == NULL )
394
394
return NULL ;
395
395
396
- ret = load_json_file (& tree , content , & parser_ctx , & err );
396
+ ret = load_json_file (tree , content , & parser_ctx , & err );
397
397
if (UNLIKELY (ret < 0 ))
398
398
return set_error (& err );
399
399
400
400
process = make_runtime_spec_schema_config_schema_process (tree , & parser_ctx , & parser_err );
401
- yajl_tree_free (tree );
401
+ json_decref (tree );
402
402
if (process == NULL )
403
403
{
404
404
cleanup_free char * msg = NULL ;
0 commit comments