<!-- 
RSS generated by JIRA (5.2.4#845-sha1:c9f4cc41abe72fb236945343a1f485c2c844dac9) at Thu May 23 05:41:11 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.couchbase.com/issues/si/jira.issueviews:issue-xml/MB-4511/MB-4511.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Couchbase</title>
    <link>http://www.couchbase.com/issues</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.4</version>
        <build-number>845</build-number>
        <build-date>26-12-2012</build-date>
    </build-info>

<item>
            <title>[MB-4511] JSON encoding during View Indexing over escapes double quotes in values</title>
                <link>http://www.couchbase.com/issues/browse/MB-4511</link>
                <project id="10010" key="MB">Couchbase Server</project>
                        <description>I&amp;#39;m getting &amp;quot;invalid_json&amp;quot; warnings during indexing/view runs for JSON docs that are indeed valid both prior to being added to the bucket and after retrieval in the UI.&lt;br/&gt;
&lt;br/&gt;
It seems to center around escaped double quotes in content.&lt;br/&gt;
&lt;br/&gt;
Steps to reproduce:&lt;br/&gt;
1. add both of the attached .json docs to a new, empty bucket.&lt;br/&gt;
2. access any of the production views. The two that should return results with this single, content document in place are &amp;quot;brewery_beers&amp;quot; and &amp;quot;by_key_value&amp;quot;&lt;br/&gt;
&lt;br/&gt;
After clicking &amp;quot;Show Results&amp;quot; for one of these views (or otherwise triggering view generation), Couchbase Server will generate an invalid_json error message (see the &amp;quot;json_encoding_issue&amp;quot; attached).&lt;br/&gt;
&lt;br/&gt;
An example of the invalidated JSON is below (abbreviated &amp;quot;description&amp;quot; value from the IPA doc):&lt;br/&gt;
\&amp;quot;Esquire Magazine calls our 90 Minute .IPA., \&amp;quot;\&amp;quot;\\\&amp;quot;\&amp;quot;\&amp;quot;perhaps the best I.P.A. in America.\&amp;quot;\&amp;quot;\\\&amp;quot;\&amp;quot;\&amp;quot; An Imperial I.P.A. brewed to be savored from a snifter....\&amp;quot;&lt;br/&gt;
&lt;br/&gt;
The invalid_json error is specifically:&lt;br/&gt;
&amp;quot;parse error: after key and value, inside map, I expect &amp;#39;,&amp;#39; or &amp;#39;}&amp;#39;\n&amp;quot;&lt;br/&gt;
&lt;br/&gt;
Additionally, we should add a test for this, but that likely deserves it&amp;#39;s own ticket.</description>
                <environment></environment>
            <key id="15666">MB-4511</key>
            <summary>JSON encoding during View Indexing over escapes double quotes in values</summary>
                <type id="1" iconUrl="http://www.couchbase.com/issues/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.couchbase.com/issues/images/icons/priorities/critical.png">Critical</priority>
                    <status id="5" iconUrl="http://www.couchbase.com/issues/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10011">Public</security>
                        <assignee username="damien">Damien Katz</assignee>
                                <reporter username="BigBlueHat">Benjamin Young</reporter>
                        <labels>
                    </labels>
                <created>Tue, 6 Dec 2011 12:30:24 -0600</created>
                <updated>Mon, 23 Jul 2012 16:07:14 -0500</updated>
                    <resolved>Wed, 7 Dec 2011 20:55:09 -0600</resolved>
                            <version>2.0-developer-preview-3</version>
                                <fixVersion>2.0-developer-preview-3</fixVersion>
                                <component>bucket-engine</component>
                <component>view-engine</component>
                                <votes>0</votes>
                        <watches>3</watches>
                                                    <comments>
                    <comment id="22913" author="alkondratenko" created="Wed, 7 Dec 2011 08:19:01 -0600"  >traced down to ejson and/or mccouch issue. By printing original value and value from validate here&amp;#39;s what I get:&lt;br/&gt;
&lt;br/&gt;
&lt;br/&gt;
Value: &amp;lt;&amp;lt;&amp;quot;{\&amp;quot;brewery\&amp;quot;:\&amp;quot;Dogfish Head Craft Brewery\&amp;quot;,\&amp;quot;name\&amp;quot;:\&amp;quot;90 Minute IPA\&amp;quot;,\&amp;quot;abv\&amp;quot;:\&amp;quot;9\&amp;quot;,\&amp;quot;description\&amp;quot;:\&amp;quot;Esquire Magazine calls our 90 Minute .IPA., \\\&amp;quot;perhaps the best I.P.A. in America.\\\&amp;quot; An Imperial I.P.A. brewed to be savored from a snifter. A big beer with a great malt backbone that stands up to the extreme hopping rate. This beer is an excellent candidate for use with Randall The Enamel Animal!\&amp;quot;,\&amp;quot;category\&amp;quot;:\&amp;quot;North American Ale\&amp;quot;,\&amp;quot;style\&amp;quot;:\&amp;quot;Imperial or Double India Pale Ale\&amp;quot;,\&amp;quot;updated\&amp;quot;:\&amp;quot;2010-07-22 20:00:20\&amp;quot;}&amp;quot;&amp;gt;&amp;gt;&lt;br/&gt;
Json:&amp;lt;&amp;lt;&amp;quot;\&amp;quot;brewery\&amp;quot;:\&amp;quot;Dogfish Head Craft Brewery\&amp;quot;,\&amp;quot;name\&amp;quot;:\&amp;quot;90 Minute IPA\&amp;quot;,\&amp;quot;abv\&amp;quot;:\&amp;quot;9\&amp;quot;,\&amp;quot;description\&amp;quot;:\&amp;quot;Esquire Magazine calls our 90 Minute .IPA., \&amp;quot;\&amp;quot;\\\&amp;quot;\&amp;quot;\&amp;quot;perhaps the best I.P.A. in America.\&amp;quot;\&amp;quot;\\\&amp;quot;\&amp;quot;\&amp;quot; An Imperial I.P.A. brewed to be savored from a snifter. A big beer with a great malt backbone that stands up to the extreme hopping rate. This beer is an excellent candidate for use with Randall The Enamel Animal!\&amp;quot;,\&amp;quot;category\&amp;quot;:\&amp;quot;North American Ale\&amp;quot;,\&amp;quot;style\&amp;quot;:\&amp;quot;Imperial or Double India Pale Ale\&amp;quot;,\&amp;quot;updated\&amp;quot;:\&amp;quot;2010-07-22 20:00:20\&amp;quot;}&amp;quot;&amp;gt;&amp;gt;&lt;br/&gt;
&lt;br/&gt;
So ejson:validate is messing with escaped quotes. Assigning to Filipe, who is familiar with ejson.&lt;br/&gt;
</comment>
                    <comment id="22914" author="Filipe Manana" created="Wed, 7 Dec 2011 08:24:48 -0600"  >Assigning to Aaron, as he wrote the validation feature for ejson recently. It&amp;#39;s only enabled bia mccouch afaik.</comment>
                    <comment id="22917" author="alkondratenko" created="Wed, 7 Dec 2011 08:56:04 -0600"  >(&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;)11&amp;gt; io:format(&amp;quot;~s~n&amp;quot;, [ejson:decode(&amp;lt;&amp;lt;&amp;quot;\&amp;quot;a\\\&amp;quot;sd\&amp;quot;&amp;quot;&amp;gt;&amp;gt;)]).                       &lt;br/&gt;
a&amp;quot;sd&lt;br/&gt;
ok&lt;br/&gt;
(&lt;a href=&apos;mailto:n_0@127.0.0.1&apos;&gt;n_0@127.0.0.1&lt;/a&gt;)12&amp;gt; io:format(&amp;quot;~s~n&amp;quot;, [element(2, ejson:validate(&amp;lt;&amp;lt;&amp;quot;\&amp;quot;a\\\&amp;quot;sd\&amp;quot;&amp;quot;&amp;gt;&amp;gt;, &amp;lt;&amp;lt;&amp;quot;_&amp;quot;&amp;gt;&amp;gt;))]).&lt;br/&gt;
&amp;quot;a&amp;quot;&amp;quot;\&amp;quot;&amp;quot;&amp;quot;sd&amp;quot;&lt;br/&gt;
ok&lt;br/&gt;
</comment>
                    <comment id="22918" author="Filipe Manana" created="Wed, 7 Dec 2011 08:57:20 -0600"  >A side note, ejson:validate functionality should definitely have unit tests. Unfortunately it&amp;#39;s not the current case.&lt;br/&gt;
Features so self contained like this, should always have unit tests.</comment>
                    <comment id="22927" author="sharon" created="Wed, 7 Dec 2011 12:53:27 -0600"  >Damien, can you fix that along your changes?</comment>
                    <comment id="22937" author="sharon" created="Wed, 7 Dec 2011 20:55:09 -0600"  >&lt;a href=&quot;http://review.couchbase.org/#change,11528&quot;&gt;http://review.couchbase.org/#change,11528&lt;/a&gt;</comment>
                    <comment id="22947" author="alkondratenko" created="Thu, 8 Dec 2011 10:37:46 -0600"  >&lt;a href=&quot;http://review.couchbase.org/11552&quot;&gt;http://review.couchbase.org/11552&lt;/a&gt;</comment>
                    <comment id="23145" author="thuan" created="Thu, 22 Dec 2011 08:36:12 -0600"  >Integrated in github-couchdb-preview #221 (See [&lt;a href=&quot;http://qa.hq.northscale.net/job/github-couchdb-preview/221/&quot;&gt;http://qa.hq.northscale.net/job/github-couchdb-preview/221/&lt;/a&gt;])&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</comment>
                    <comment id="23364" author="thuan" created="Fri, 30 Dec 2011 14:36:14 -0600"  >Integrated in github-couchdb-preview #226 (See [&lt;a href=&quot;http://qa.hq.northscale.net/job/github-couchdb-preview/226/&quot;&gt;http://qa.hq.northscale.net/job/github-couchdb-preview/226/&lt;/a&gt;])&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;</comment>
                </comments>
                    <attachments>
                    <attachment id="11874" name="beer_90_Minute_IPA.json" size="522" author="BigBlueHat" created="Tue, 6 Dec 2011 12:30:24 -0600" />
                    <attachment id="11875" name="beer.json" size="1160" author="BigBlueHat" created="Tue, 6 Dec 2011 12:30:24 -0600" />
                    <attachment id="11876" name="json_encoding_issue" size="12035" author="BigBlueHat" created="Tue, 6 Dec 2011 12:30:24 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                        <customfield id="customfield_10180" key="com.atlassian.jira.ext.charting:firstresponsedate">
                <customfieldname>Date of First Response</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>Wed, 7 Dec 2011 08:19:01 -0600</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                    <customfield id="customfield_10010" key="com.atlassian.jira.plugin.system.customfieldtypes:multicheckboxes">
                <customfieldname>Flagged</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10000"><![CDATA[Impediment]]></customfieldvalue>
    
                </customfieldvalues>
            </customfield>
                                                                                                                                                <customfield id="customfield_10081" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Rank</customfieldname>
                <customfieldvalues>
                    <customfieldvalue>5943</customfieldvalue>
                </customfieldvalues>
            </customfield>
                                                                                                                                                                                        <customfield id="customfield_10181" key="com.atlassian.jira.ext.charting:timeinstatus">
                <customfieldname>Time In Status</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                                </customfields>
    </item>
</channel>
</rss>