couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r736856 - in /couchdb/trunk/src/couchdb: couch_httpd_db.erl couch_httpd_misc_handlers.erl
Date Thu, 22 Jan 2009 23:55:43 GMT
Author: jchris
Date: Thu Jan 22 15:55:43 2009
New Revision: 736856

URL: http://svn.apache.org/viewvc?rev=736856&view=rev
Log:
Fix some eJSON stragglers (works with mochijson2, but not eep18). thanks kocolosk!

Modified:
    couchdb/trunk/src/couchdb/couch_httpd_db.erl
    couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl

Modified: couchdb/trunk/src/couchdb/couch_httpd_db.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_db.erl?rev=736856&r1=736855&r2=736856&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_db.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_db.erl Thu Jan 22 15:55:43 2009
@@ -129,7 +129,7 @@
         % output the results
         DocResults = lists:zipwith(
             fun(Doc, NewRev) ->
-                {[{"id", Doc#doc.id}, {"rev", NewRev}]}
+                {[{<<"id">>, Doc#doc.id}, {<<"rev">>, NewRev}]}
             end,
             Docs, ResultRevs),
         send_json(Req, 201, {[
@@ -210,17 +210,17 @@
                 deleted_conflict_revs=DelConflictRevs
             } = DocInfo,
             Json = {
-                [{"rev", Rev}] ++
+                [{<<"rev">>, Rev}] ++
                 case ConflictRevs of
                     []  ->  [];
-                    _   ->  [{"conflicts", ConflictRevs}]
+                    _   ->  [{<<"conflicts">>, ConflictRevs}]
                 end ++
                 case DelConflictRevs of
                     []  ->  [];
-                    _   ->  [{"deleted_conflicts", DelConflictRevs}]
+                    _   ->  [{<<"deleted_conflicts">>, DelConflictRevs}]
                 end ++
                 case Deleted of
-                    true -> [{"deleted", true}];
+                    true -> [{<<"deleted">>, true}];
                     false -> []
                 end
             },

Modified: couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl
URL: http://svn.apache.org/viewvc/couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl?rev=736856&r1=736855&r2=736856&view=diff
==============================================================================
--- couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl (original)
+++ couchdb/trunk/src/couchdb/couch_httpd_misc_handlers.erl Thu Jan 22 15:55:43 2009
@@ -107,7 +107,7 @@
     % generate the uuids
     UUIDs = [ couch_util:new_uuid() || _ <- lists:seq(1,Count)],
     % send a JSON response
-    send_json(Req, {[{"uuids", UUIDs}]});
+    send_json(Req, {[{<<"uuids">>, UUIDs}]});
 handle_uuids_req(Req) ->
     send_method_not_allowed(Req, "POST").
 



Mime
View raw message