Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 2.0-developer-preview-3
-
Fix Version/s: 2.0-developer-preview-3
-
Component/s: bucket-engine, view-engine
-
Security Level: Public
-
Labels:None
-
Flagged:Impediment
Description
I'm getting "invalid_json" 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.
It seems to center around escaped double quotes in content.
Steps to reproduce:
1. add both of the attached .json docs to a new, empty bucket.
2. access any of the production views. The two that should return results with this single, content document in place are "brewery_beers" and "by_key_value"
After clicking "Show Results" for one of these views (or otherwise triggering view generation), Couchbase Server will generate an invalid_json error message (see the "json_encoding_issue" attached).
An example of the invalidated JSON is below (abbreviated "description" value from the IPA doc):
\"Esquire Magazine calls our 90 Minute .IPA., \"\"\\\"\"\"perhaps the best I.P.A. in America.\"\"\\\"\"\" An Imperial I.P.A. brewed to be savored from a snifter....\"
The invalid_json error is specifically:
"parse error: after key and value, inside map, I expect ',' or '}'\n"
Additionally, we should add a test for this, but that likely deserves it's own ticket.
It seems to center around escaped double quotes in content.
Steps to reproduce:
1. add both of the attached .json docs to a new, empty bucket.
2. access any of the production views. The two that should return results with this single, content document in place are "brewery_beers" and "by_key_value"
After clicking "Show Results" for one of these views (or otherwise triggering view generation), Couchbase Server will generate an invalid_json error message (see the "json_encoding_issue" attached).
An example of the invalidated JSON is below (abbreviated "description" value from the IPA doc):
\"Esquire Magazine calls our 90 Minute .IPA., \"\"\\\"\"\"perhaps the best I.P.A. in America.\"\"\\\"\"\" An Imperial I.P.A. brewed to be savored from a snifter....\"
The invalid_json error is specifically:
"parse error: after key and value, inside map, I expect ',' or '}'\n"
Additionally, we should add a test for this, but that likely deserves it's own ticket.
Activity
Aleksey Kondratenko
made changes -
| Field | Original Value | New Value |
|---|---|---|
| Assignee | Aleksey Kondratenko [ alkondratenko ] |
Aleksey Kondratenko
made changes -
| Assignee | Aleksey Kondratenko [ alkondratenko ] | Filipe Manana [ Filipe Manana ] |
Aleksey Kondratenko
made changes -
| Fix Version/s | 2.0-developer-preview-3 [ 10247 ] | |
| Affects Version/s | 2.0-developer-preview-3 [ 10247 ] | |
| Priority | Major [ 3 ] | Critical [ 2 ] |
Sharon Barr
made changes -
| Assignee | Aaron Miller [ aaron ] | Damien Katz [ damien ] |
Sharon Barr
made changes -
| Status | Open [ 1 ] | Resolved [ 5 ] |
| Resolution | Fixed [ 1 ] |
Peter Wansch
made changes -
| Component/s | bucket-engine [ 10010 ] | |
| Component/s | mccouch [ 10071 ] |
Value: <<"{\"brewery\":\"Dogfish Head Craft Brewery\",\"name\":\"90 Minute IPA\",\"abv\":\"9\",\"description\":\"Esquire Magazine calls our 90 Minute .IPA., \\\"perhaps the best I.P.A. in America.\\\" 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!\",\"category\":\"North American Ale\",\"style\":\"Imperial or Double India Pale Ale\",\"updated\":\"2010-07-22 20:00:20\"}">>
Json:<<"\"brewery\":\"Dogfish Head Craft Brewery\",\"name\":\"90 Minute IPA\",\"abv\":\"9\",\"description\":\"Esquire Magazine calls our 90 Minute .IPA., \"\"\\\"\"\"perhaps the best I.P.A. in America.\"\"\\\"\"\" 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!\",\"category\":\"North American Ale\",\"style\":\"Imperial or Double India Pale Ale\",\"updated\":\"2010-07-22 20:00:20\"}">>
So ejson:validate is messing with escaped quotes. Assigning to Filipe, who is familiar with ejson.