From c7841ce633b37cc3138678cdf78281c38c63eb00 Mon Sep 17 00:00:00 2001 From: erickson Date: Wed, 31 Aug 2005 19:36:16 +0000 Subject: [PATCH] updated to new json api git-svn-id: svn://svn.open-ils.org/ILS/trunk@1785 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/apachemods/mod_rest_gateway.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/apachemods/mod_rest_gateway.c b/Open-ILS/src/apachemods/mod_rest_gateway.c index e04de6b24e..9dbcde69c3 100644 --- a/Open-ILS/src/apachemods/mod_rest_gateway.c +++ b/Open-ILS/src/apachemods/mod_rest_gateway.c @@ -50,7 +50,7 @@ static int mod_ils_gateway_method_handler (request_rec *r) { char* method = NULL; /* method to perform */ //json* exception = NULL; /* returned in error conditions */ - object* exception = NULL; /* returned in error conditions */ + jsonObject* exception = NULL; /* returned in error conditions */ string_array* sarray = init_string_array(12); /* method parameters */ growing_buffer* buffer = NULL; /* POST data */ @@ -157,7 +157,7 @@ static int mod_ils_gateway_method_handler (request_rec *r) { while((omsg = osrf_app_session_request_recv( session, req_id, 60 ))) { if( omsg->_result_content ) { - char* content = object_to_json(omsg->_result_content); + char* content = jsonObjectToJSON(omsg->_result_content); buffer_add(result_data, content); buffer_add( result_data, ","); free(content); @@ -179,8 +179,8 @@ static int mod_ils_gateway_method_handler (request_rec *r) { buffer_add( exc_buffer, code ); exception = json_parse_string("{}"); - exception->add_key(exception, "is_err", json_parse_string("1")); - exception->add_key(exception, "err_msg", new_object(exc_buffer->buf) ); + jsonObjectSetKey(exception, "is_err", json_parse_string("1")); + jsonObjectSetKey(exception, "err_msg", jsonNewObject(exc_buffer->buf) ); warning_handler("*** Looks like we got a " "server exception\n%s", exc_buffer->buf ); @@ -205,8 +205,8 @@ static int mod_ils_gateway_method_handler (request_rec *r) { char* content = NULL; if(exception) { - content = exception->to_json(exception); - free_object(exception); + content = jsonObjectToJSON(exception); + jsonObjectFree(exception); } /* set content type to text/xml for passing around XML objects */ -- 2.43.2