/* ------------------------------------------------------------------------- */
/**
- * The following methods provide a ficility for serializing and
+ * The following methods provide a facility for serializing and
* deserializing "classed" JSON objects. To give a JSON object a
* class, simply call jsonObjectSetClass().
* Then, calling jsonObjectEncodeClass() will convert the JSON
* class-wrapped (serialized) object
* Caller must free the returned object
*/
-jsonObject* jsonObjectEncodeClass( jsonObject* obj );
+jsonObject* jsonObjectEncodeClass( const jsonObject* obj );
/* ------------------------------------------------------------------------- */
#include <opensrf/osrf_json.h>
-jsonObject* _jsonObjectEncodeClass( jsonObject* obj, int ignoreClass );
+jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClass );
jsonObject* jsonObjectFindPath( const jsonObject* obj, char* path, ...);
return newObj;
}
-jsonObject* jsonObjectEncodeClass( jsonObject* obj ) {
+jsonObject* jsonObjectEncodeClass( const jsonObject* obj ) {
return _jsonObjectEncodeClass( obj, 0 );
}
-jsonObject* _jsonObjectEncodeClass( jsonObject* obj, int ignoreClass ) {
+jsonObject* _jsonObjectEncodeClass( const jsonObject* obj, int ignoreClass ) {
//if(!obj) return NULL;
if(!obj) return jsonNewObject(NULL);