question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Multiline description with json

See original GitHub issue

I’m adding descriptions with \n but they are not interpreted.

Example:

{
  "basePath": "/v1",
  "consumes": [
    "application/json"
  ],
  "host": "test.com",
  "info": {
    "description": "Test\nTest",
    "title": "Test",
    "version": "1"
  }
}

Am I doing something wrong or is this really an issue?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
christopher-bonitzcommented, Jul 22, 2021

I think I found this bug in another element, can I request to reopen this issue? the fix is most likely very similar. I’m finding missing new lines on model descriptions/summery

“Horse”: { “terminalId”: { “type”: “string”, “description”: “Identification bla bla bla. \r\nIt must be possible to bla bla bla.\r\nThis information is only required for bla bla bla”, “nullable”: true } }

I have been able to get around this by simply adding <br /> to the xml summaries that are generating the model descriptions. Not a terrible way to do it, but a shame since newlines are supported in the output pipeline

Thanks a lot

0reactions
pedro-teixeiracommented, Aug 21, 2016

@RomanGotsiy works for me! Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Are multi-line strings allowed in JSON? - Stack Overflow
JSON does not allow "real" newlines in its data ; it can only have escaped newlines. See the answer from @YOU. According to...
Read more >
Storing multi-line strings in JSON with JSONLint - Gun.io
This quick hack helps find a way to store multi-line strings in JSON to interact with JS and Node.
Read more >
JSON Multi-Line String - Linux Hint
A creative way of inserting a multi-line string in JSON is to use an array. We can separate each line as an individual...
Read more >
Need a human friendly multi-line "description" in json-schemas
The current "description" property is a string only, can it be made into either a string or a string array so that it...
Read more >
Solved: multi line string in json is being rejected.
multi line string in json is being rejected · 1. Add a compose above the HTTP action step. · 2. Construct the query...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found