Description
Problem
A single element JSON is a valid JSON document, unfortunately cbimport/cbexport does not support them. 'cbexport' ignores them altogether, and 'cbimport' throws an error when given them.
Example of single Element JSON docs:
5
|
"raw string"
|
["array","of","raw","values",12345,true]
|
true
|
cbexport:
/Applications/Couchbase\ Server.app/Contents/Resources/couchbase-core/bin/cbexport json -c localhost -u Administrator -p password -f lines -o export -b default
|
2018-11-08T14:38:20.737+00:00 WARN: Value of key `<ud>array</ud>` is not valid json, skipping -- jsondata.(*jsonLineCallbacks).Mutation() at lines_exporter.go:61
|
2018-11-08T14:38:20.738+00:00 WARN: Value of key `<ud>number</ud>` is not valid json, skipping -- jsondata.(*jsonLineCallbacks).Mutation() at lines_exporter.go:61
|
2018-11-08T14:38:20.738+00:00 WARN: Value of key `<ud>string</ud>` is not valid json, skipping -- jsondata.(*jsonLineCallbacks).Mutation() at lines_exporter.go:61
|
Step to reproduce
- Create a single element JSON doc in the document editor in the UI
- Use cbexport
- Create a single element JSON doc in the JSON list/line file
- Use cbimport with the file created above
(Should check that the document is getting tagged as JSON by the Data service)
Attachments
Issue Links
- relates to
-
MB-31862 INFER does not work on single element JSON docs
- Closed