Replaced two occurrences of jsonParseString( "[]" ) with the
equivalant (and faster) call to jsonNewObject( JSON_ARRAY ).
M src/libopensrf/osrf_application.c
M src/srfsh/srfsh.c
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1808
9efc2488-bf62-4759-914b-
345cdb29e865
osrfLogDebug( OSRF_LOG_MARK,
"Adding responses to stash for atomic method %s", ctx->method->name );
- if( ctx->responses == NULL )
- ctx->responses = jsonParseString("[]");
+ if( ctx->responses == NULL )
+ ctx->responses = jsonNewObjectType( JSON_ARRAY );
if ( data != NULL )
jsonObjectPush( ctx->responses, jsonObjectClone(data) );
osrfAppSession* session = osrfAppSessionClientInit( "opensrf.math" );
osrfAppSessionConnect(session);
- jsonObject* params = jsonParseString("[]");
+ jsonObject* params = jsonNewObjectType( JSON_ARRAY );
jsonObjectPush(params,jsonNewObject("1"));
jsonObjectPush(params,jsonNewObject("2"));