You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ch...@apache.org on 2014/02/14 20:58:17 UTC

[2/3] couch-mrview commit: updated refs/heads/1993-bigcouch-couch-mrview to f980f25

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 <ch...@gmail.com>
Authored: Thu Feb 13 12:34:47 2014 -0800
Committer: Russell Branca <ch...@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.