couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chewbra...@apache.org
Subject [2/3] couch-mrview commit: updated refs/heads/1993-bigcouch-couch-mrview to f980f25
Date Fri, 14 Feb 2014 19:58:17 GMT
Bring in RCouch's parse_json function

This brings in the parse_json function from couch-chttpd 70409b20 which will
not reparse binaries that have already been JSON decoded.


Project: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/commit/11eb1b3c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/tree/11eb1b3c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/diff/11eb1b3c

Branch: refs/heads/1993-bigcouch-couch-mrview
Commit: 11eb1b3ce04b8a922d4ebff07c2cb708e2e7f1ba
Parents: dae6078
Author: Russell Branca <chewbranca@gmail.com>
Authored: Thu Feb 13 12:34:47 2014 -0800
Committer: Russell Branca <chewbranca@gmail.com>
Committed: Thu Feb 13 12:34:47 2014 -0800

----------------------------------------------------------------------
 src/couch_mrview_http.erl | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-couch-mrview/blob/11eb1b3c/src/couch_mrview_http.erl
----------------------------------------------------------------------
diff --git a/src/couch_mrview_http.erl b/src/couch_mrview_http.erl
index 944b1ac..71c3845 100644
--- a/src/couch_mrview_http.erl
+++ b/src/couch_mrview_http.erl
@@ -343,3 +343,9 @@ check_view_etag(Sig, Acc0, Req) ->
         true -> throw({etag_match, ETag});
         false -> {ok, Acc0#vacc{etag=ETag}}
     end.
+
+
+parse_json(V) when is_list(V) ->
+    ?JSON_DECODE(V);
+parse_json(V) ->
+    V.


Mime
View raw message