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.

JSON mode shows the json in one line.

See original GitHub issue

import 'brace/mode/json'; <ReactAce mode='json' value={JSON.stringify(jsonObject)} theme='github' />

The entire json is shown in 1 line and with no formatting.

What option should enable formatting of the jsonObject?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6

github_iconTop GitHub Comments

11reactions
chriswatts91commented, Nov 4, 2017

@id0Sch I think value is a string? If so you could try parsing it first: JSON.stringify(JSON.parse(value), null, 2)

6reactions
shatyajeetcommented, Mar 17, 2017

Scratch that. JSON.stringify(jsonObject, null, 2) solves it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JSON output is putting all lines in one line - Stack Overflow
The problem I am having is that it somehow adds all the lines from the txt file in one very long line in...
Read more >
JSON Lines
JSON Lines is a convenient format for storing structured data that may be processed one record at a time. It works well with...
Read more >
Json Format To One Line - ITALCOLLAUDI
Json Format To One LineYou should now see the output JSON in one single line. Once copied, click the "convert" option to convert...
Read more >
JSON file | Databricks on AWS
You can read JSON files in single-line or multi-line mode. In single-line mode, a file can be split into many parts and read...
Read more >
PySpark Read JSON file into DataFrame - Spark by {Examples}
PySpark SQL provides read.json("path") to read a single line or multiline (multiple lines) JSON file into PySpark DataFrame and ...
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