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.

Force reformatting to always put double quotes around keys

See original GitHub issue
  1. What version of RJEA are you using (react-json-editor-ajrm version)? *REQUIRED 2.5.8
  2. What operating system and processor architecture are you using? *REQUIRED MacOS Sierra
  3. What did you do? *REQUIRED I copy/pasted this json:
{
"a": 2,
"xxx": "Hi"
}
  1. What did you expect to see? *REQUIRED I expected to have the json in the editor formatted but still keeping the quotes around the key names
  2. What did you see instead? *REQUIRED The keys lose the quotes around them. This creates problem for users that want to copy from the editor and paste the json object elsewhere. Is there a option to keep the quotes around the keys?

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:5
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
rusekrcommented, Sep 18, 2019

Hello! +100500 quotes to this. It is critical functional for json editor. For now it is not JSON editor. It is just JS-object editor. It converts json to js forcibly and not configurable and after this you edit js-object and not json. Unable to copy past and verify json with this JS editor because of that. Seeing this issue and it’s date and thinking we now need to find something different. People past real valid json into this editor and complain because of parse errors - it’s a bug.

4reactions
PatrickSachscommented, Dec 1, 2018

Hello @StefanoSega

Thanks for reporting this. As you noticed this is currently intended behavior. Quotes are only added if required (e.g. due to a space in the key name).

I’ll flag this as feature request and maybe we’ll get to it at some point in the future. However we’re in dire need of collaborators so I cannot give you an estimated timeframe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Do the JSON keys have to be surrounded by quotes?
A string begins and ends with quotation marks. So I would say that according to the standard: yes, you should always quote the...
Read more >
Need to press the quote( " ) key twice - Microsoft Community
Recently purchased a new Dell laptop and I need to press the " key twice, in order to get it printed on screen...
Read more >
How to Type Curly Quotes and Curly Apostrophes - Lifewire
Use ALT+0147 and ALT+0148 for the left and right double quotation marks, respectively. Use the numeric keypad and not the row of numbers...
Read more >
How do you force excel to quote all columns of a CSV file?
@1owk3y Just select all, Format > Cell > and select Text in Category box. This makes all values become text = everything will...
Read more >
Quotation marks in English - Wikipedia
Despite being semantically different, the typographic closing single quotation mark and the typographic apostrophe have the same visual appearance and code ...
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