Hi There,
I have multiline in the data.
I cannot see \n as new line in select output in table format as well.
Could you please let me know how can I see the data in multiline in select query output.
Best Regards,
Shiva
Hi There,
I have multiline in the data.
I cannot see \n as new line in select output in table format as well.
Could you please let me know how can I see the data in multiline in select query output.
Best Regards,
Shiva
Are using SDKs, curl or cbq shell or query work bench. cbq shell/ query work bench default pretty format of JSON (you can turn off using pretty=false query parameter).
Please provide example.
It is part of the string it should show as \n . it will not as new line in output.
If you are using the REST API / cbq, responses are JSON and as per the JSON spec - JSON - the characters are escaped within JSON elements.
If you want to present the results in non-JSON form, then you have to process the result to suit your desired output format.
I am using Query (in web UI) to run N1QL. I am not able see the result in new line. If I have 3 lines (2 \n s) I could see as single line even when I copied results to excel.
when I want to give analytics access to users, it is not pretty good to see.
Regards,
Shiva
If it is part of string you need to process results AS @dh mentioned
Checkout Best JSON Pretty Print Online following document
{"a":1,"b":"abc","c":"1\n2\n"}
Understand long stings it might not be pretty good to see. cc @eben
Here is an example of the issue. Try this query in the workbench:
select “hello\nworld”;
The JSON result is, as expected:
[
{
"$1": "hello\nworld"
}
]
However, the newline is not shown in the tabular view:
The tabular view is custom code for showing the nested structures that come from JSON. Reflowing text fields to add newlines would be pretty difficult, but we can consider it as an improvement request if it’s important to the user.