Couchbase Lexical Error Invalid Char In Json Text
Contents |
Export Tools Couchbase ServerMB-6989Error message is not user-friendly when user tries to compile a query and pass string for startkey and endkeyAgile Board ExportXMLWordPrintable Details Type: Bug Status: In Progress Priority: Major Resolution: Unresolved Affects Version/s: 2.0.1, 2.1.0 Fix Version/s: bug-backlog Component/s: UI Security Level: Public Labels: None Triage: Untriaged Operating System: Ubuntu 32-bit Link error: lexical error: invalid char in json text. r to Log File, atop/blg, CBCollectInfo, Core dump: a Description If user do not add quotes
Error In Parse_string(txt, Bigint_as_char) : Lexical Error: Invalid Char In Json Text.
to string key error appears: {"error":"bad_request","reason":"invalid UTF-8 JSON: error,{1,\"lexical error: invalid char in json text.\\n\",\n \"simple\"}"} but there is no invalid
Lexical Error Invalid Char In Json Text Jsonlite
char, just the string is not quoted. Steps: 1. create some doc with string key ('simple' in my case) 2. create some view 3. go to view page and enter just simple in startkey parameter 4.
Jsonlite Lexical Error
perform query Issue Links is duplicated by MB-7156 view Filter Results startkey/endkey fields needs double-quotes, but error message is unhelpful ( hint in the UI would be helpful ) Closed OptionsIssue OnlyShow All ReviewsShow Open ReviewsGerrit Reviews # Subject Project Status CR V For Gerrit Dashboard: &For+MB-6989=message:MB-6989 27425,1 MB-6989: added validation of filter fields ns_server Status: ABANDONED 0 0 27457,3 MB-6989: added validation of filter fields ns_server Status: ABANDONED -1 +1 27548,1 Merge lexical error: invalid char in json text chef remote-tracking branch 'origin/2.2.0' ns_server Status: MERGED +2 +1 Activity All Comments Work Log History Activity Gerrit Reviews Ascending order - Click to sort in descending order Hide Permalink Farshid Ghods (Inactive) added a comment - 23/Oct/12 7:06 AM i face the same issue everytime i want to run a startey and endkey query Show Farshid Ghods (Inactive) added a comment - 23/Oct/12 7:06 AM i face the same issue everytime i want to run a startey and endkey query Hide Permalink iryna added a comment - 02/Jun/15 10:25 AM 4.0.0-3092 behaviour is still the same Show iryna added a comment - 02/Jun/15 10:25 AM 4.0.0-3092 behaviour is still the same Hide Permalink Pavel Blagodov added a comment - 04/Jun/15 5:02 AM In views filter we allow arbitrary json as filter keys. So we have to demand quotes etc. But in documents there are only strings. In other words only documents section filter automatically adds quotes to the start/end key. Try to fill out startkey/endkey field with [] and you will not see the error. I think the best thing we can do is to add link somewhere in the filter to the wiki page (http://docs.couchbase.com/admin/admin/Views/views-querying.html) or add what's this message. Show Pavel Blagodov added a comment - 04/Jun/15 5:02 AM In views filter we allow
Export Tools Couchbase ServerMB-7555[DOC RN] Invalid JSON reported for valid keys during queryingAgile Board ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: Critical Resolution: Incomplete Affects Version/s: 2.0, 2.0.1 Fix Version/s: 2.1.0 Component/s: None Security Level: Public error lexical error invalid char in json text h2o Labels: None Environment: Linux Mint 13 Description When getting results from caused by lexical error invalid char in json text a view using a start key, Couchbase reports: bad_request (invalid UTF-8 JSON: error,{1,"lexical error: invalid char lexical error invalid string in json text in json text.\n", "..."}) Steps to reproduce: 1. create a bucket 2. create a new document with key "KEY-1a4b" 3. create a view with the following map https://issues.couchbase.com/browse/MB-6989 function: function (doc, meta) { emit(meta.id, doc); } 4. query the view using the URL: http://.../test/_design/dev_main/_view/all_documents?stale=false&startkey=KEY-1a4b&connection_timeout=60000&limit=10&skip=0 OptionsIssue OnlyShow All ReviewsShow Open ReviewsShow All IssuesShow Open IssuesGerrit Reviews No reviews matched the request. Check your Options in the drop-down menu of this sections header. Activity All Comments Work Log History Activity Gerrit Reviews Ascending https://issues.couchbase.com/browse/MB-7555 order - Click to sort in descending order Hide Permalink Dipti Borkar added a comment - 20/Jan/13 7:14 PM take a look at this when you get a chance. marking for 2.0.2 for now. Show Dipti Borkar added a comment - 20/Jan/13 7:14 PM take a look at this when you get a chance. marking for 2.0.2 for now. Hide Permalink Farshid Ghods (Inactive) added a comment - 20/Jan/13 8:54 PM Startkey should be quoted try start key='key-1a4b' Show Farshid Ghods (Inactive) added a comment - 20/Jan/13 8:54 PM Startkey should be quoted try start key='key-1a4b' Hide Permalink schp added a comment - 21/Jan/13 2:40 AM I tried but it does not help, the returned error message is the same. Show schp added a comment - 21/Jan/13 2:40 AM I tried but it does not help, the returned error message is the same. Hide Permalink schp added a comment - 21/Jan/13 4:13 AM It indeed works with quotation ma
Support Search GitHub This repository Watch 11 Star 114 Fork 38 jeroenooms/jsonlite forked from duncantl/RJSONIO Code Issues 22 Pull https://github.com/jeroenooms/jsonlite/issues/106 requests 2 Projects 0 Pulse Graphs New issue Error: invalid char in json text #106 Closed briatte opened this Issue Aug 1, 2015 · 7 comments Projects None yet Labels None yet Milestone No milestone Assignees No one assigned 2 participants briatte commented Aug 1, 2015 Hi, This is probably a newbie question. I'm re-running some code lexical error that used to work fine about six months ago. I'm using jsonlite::fromJSON(flatten = TRUE) and getting the following error: Error in feed_push_parser(buf) : lexical error: invalid char in json text. {"dokumentstatus":{"dokument (right here) ------^ Here's the data file. Am I doing something wrong? Owner jeroenooms commented Aug 1, 2015 Are you running the latest version? It works in json text fine here: mydata <- fromJSON("https://gist.githubusercontent.com/briatte/c5a72004359659a287b9/raw/222c77f538cd3a7168423d2830e49bb091c8a29d/gc02a1.json") Or with curl: text <- readLines(curl("https://gist.githubusercontent.com/briatte/c5a72004359659a287b9/raw/222c77f538cd3a7168423d2830e49bb091c8a29d/gc02a1.json")) mydata <- fromJSON(text) Give me the exact code you are running that results in this error. briatte commented Aug 1, 2015 You're right, this also works at home… Something is super-weird here. The file comes from a ZIP that I'm locally unzipping before parsing the contents (could not find a way to use fromJSON on a connection created by unz). So the issue must be with the ZIP file. Here's a reproducible example that fails to work: library(jsonlite) dir.create("exampledata") download.file("http://data.riksdagen.se/dataset/dokument/mot-2014-2017.json.zip", "mot-2014-2017.json.zip", mode = "wb") unzip("mot-2014-2017.json.zip", exdir = "exampledata") f = list.files("exampledata", pattern = "json$", full.names = TRUE) for(j in f) { d = fromJSON(j, flatten = TRUE)$dokumentstatus cat("hangar_id:", d$dokument$hangar_id, "dok_id:", d$dokument$dok_id, "\n") } It actually works if you readLines on the file first to deal with the missing final line: Warning message: In readLines(j) : incomplete final line found on 'exampledata/h2021.json' This must have been done internally in the past, because the code used to work fine. Using jsonl