Index: u1db/src/u1db_http_sync_target.c
===================================================================
--- u1db.orig/src/u1db_http_sync_target.c	2014-11-16 13:45:23.843328797 -0500
+++ u1db/src/u1db_http_sync_target.c	2014-11-16 13:45:23.839328909 -0500
@@ -458,7 +458,7 @@
         status = U1DB_NOMEM;
         goto finish;
     }
-    obj = json_object_object_get(json, "target_replica_uid");
+    json_object_object_get_ex(json, "target_replica_uid", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
@@ -482,13 +482,13 @@
         status = U1DB_NOMEM;
         goto finish;
     }
-    obj = json_object_object_get(json, "target_replica_generation");
+    json_object_object_get_ex(json, "target_replica_generation", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
     }
     *st_gen = json_object_get_int(obj);
-    obj = json_object_object_get(json, "target_replica_transaction_id");
+    json_object_object_get_ex(json, "target_replica_transaction_id", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
@@ -503,13 +503,13 @@
             goto finish;
         }
     }
-    obj = json_object_object_get(json, "source_replica_generation");
+    json_object_object_get_ex(json, "source_replica_generation", &obj);
     if (obj == NULL) {
         status = U1DB_INVALID_HTTP_RESPONSE;
         goto finish;
     }
     *source_gen = json_object_get_int(obj);
-    obj = json_object_object_get(json, "source_transaction_id");
+    json_object_object_get_ex(json, "source_transaction_id", &obj);
     if (obj == NULL) {
         *trans_id = NULL;
     } else {
@@ -920,14 +920,14 @@
         goto finish;
     }
     obj = json_object_array_get_idx(json, 0);
-    attr = json_object_object_get(obj, "new_generation");
+    json_object_object_get_ex(obj, "new_generation", &attr);
     if (attr == NULL) {
         //printf("broken 3\n");
         status = U1DB_BROKEN_SYNC_STREAM;
         goto finish;
     }
     *target_gen = json_object_get_int(attr);
-    attr = json_object_object_get(obj, "new_transaction_id");
+    json_object_object_get_ex(obj, "new_transaction_id", &attr);
     if (attr == NULL) {
         //printf("broken 4\n");
         status = U1DB_BROKEN_SYNC_STREAM;
@@ -946,7 +946,7 @@
     }
 
     if (autocreated_replica_uid != NULL) {
-        attr = json_object_object_get(obj, "replica_uid");
+        json_object_object_get_ex(obj, "replica_uid", &attr);
         if (attr != NULL) {
             tmp = json_object_get_string(attr);
             if (tmp == NULL) {
@@ -964,15 +964,15 @@
 
     for (i = 1; i < doc_count; ++i) {
         obj = json_object_array_get_idx(json, i);
-        attr = json_object_object_get(obj, "id");
+        json_object_object_get_ex(obj, "id", &attr);
         doc_id = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "rev");
+        json_object_object_get_ex(obj, "rev", &attr);
         rev = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "content");
+        json_object_object_get_ex(obj, "content", &attr);
         content = json_object_get_string(attr);
-        attr = json_object_object_get(obj, "gen");
+        json_object_object_get_ex(obj, "gen", &attr);
         gen = json_object_get_int(attr);
-        attr = json_object_object_get(obj, "trans_id");
+        json_object_object_get_ex(obj, "trans_id", &attr);
         trans_id = json_object_get_string(attr);
         status = u1db__allocate_document(doc_id, rev, content, 0, &doc);
         if (status != U1DB_OK)
Index: u1db/src/u1db_query.c
===================================================================
--- u1db.orig/src/u1db_query.c	2014-11-16 13:45:23.843328797 -0500
+++ u1db/src/u1db_query.c	2014-11-16 13:45:23.839328909 -0500
@@ -306,7 +306,7 @@
     if (!json_object_is_type(obj, json_type_object)) {
         goto finish;
     }
-    val = json_object_object_get(obj, field->data);
+    json_object_object_get_ex(obj, field->data, &val);
     if (val == NULL)
         goto finish;
     if (field->next != NULL) {
