hash keys have to be escaped like regular strings
authorerickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 25 Mar 2009 22:35:45 +0000 (22:35 +0000)
committererickson <erickson@9efc2488-bf62-4759-914b-345cdb29e865>
Wed, 25 Mar 2009 22:35:45 +0000 (22:35 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1682 9efc2488-bf62-4759-914b-345cdb29e865

src/libopensrf/osrf_json_object.c

index 8a476be..1eddd9c 100644 (file)
@@ -352,7 +352,7 @@ static void add_json_to_buffer( const jsonObject* obj,
                        while( (item = osrfHashIteratorNext(itr)) ) {
                                if(i++ > 0) OSRF_BUFFER_ADD_CHAR(buf, ',');
                                OSRF_BUFFER_ADD_CHAR(buf, '"');
-                               OSRF_BUFFER_ADD(buf, osrfHashIteratorKey(itr));
+                buffer_append_utf8(buf, osrfHashIteratorKey(itr));
                                OSRF_BUFFER_ADD(buf, "\":");
                                add_json_to_buffer( item, buf, do_classname, second_pass );
                        }