Blob Blame History Raw
From: "Paul J. Davis" <paul.joseph.davis@gmail.com>
Date: Mon, 30 Oct 2017 16:47:06 -0500
Subject: [PATCH] Update jiffy to use dedupe_keys


diff --git a/src/couchdb/couch_db.hrl b/src/couchdb/couch_db.hrl
index 3bc288845..724b3db8b 100644
--- a/src/couchdb/couch_db.hrl
+++ b/src/couchdb/couch_db.hrl
@@ -24,7 +24,7 @@
 -define(REWRITE_COUNT, couch_rewrite_count).
 
 -define(JSON_ENCODE(V), jiffy:encode(V, [force_utf8])).
--define(JSON_DECODE(V), try jiffy:decode(V) catch throw:Error -> throw({invalid_json, Error}) end).
+-define(JSON_DECODE(V), try jiffy:decode(V, [dedupe_keys]) catch throw:Error -> throw({invalid_json, Error}) end).
 
 -define(b2l(V), binary_to_list(V)).
 -define(l2b(V), list_to_binary(V)).
diff --git a/test/couchdb/fixtures/os_daemon_configer.escript.in b/test/couchdb/fixtures/os_daemon_configer.escript.in
index 8b77480fd..9337fc6d9 100755
--- a/test/couchdb/fixtures/os_daemon_configer.escript.in
+++ b/test/couchdb/fixtures/os_daemon_configer.escript.in
@@ -19,7 +19,7 @@ read() ->
         eof ->
             stop;
         Data ->
-            try jiffy:decode(Data) catch throw:Error -> throw({invalid_json, Error}) end
+            try jiffy:decode(Data, [dedupe_keys]) catch throw:Error -> throw({invalid_json, Error}) end
     end.
 
 write(Mesg) ->