JSONovich / jsonovich

A webextension for Firefox. Pretty-prints JSON content in the browser for easy, unobtrusive viewing.
https://addons.mozilla.org/firefox/addon/jsonovich/
Mozilla Public License 2.0
7 stars 3 forks source link

Provide option to quote (double-quote marks) all JSON keys #28

Closed GoogleCodeExporter closed 7 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Run code to generate your JSON
2.View JSON in Firfox under JSONovitch
3.All keys are unquoted
4. Copy and paste into a JSON validator - it fails

What is the expected output? What do you see instead?
I would expect the keys to be quoted

What version of the product are you using? On what operating system?
1.9.0.1 on OS X 10.6.8 using Firefox 7.0.1 

Please provide any additional information below.
Ideally this would be an option, as I suspect some people would prefer the 
unquoted version which may be useful for pasting into JavaScript

Thanks
Jean-Yves

Original issue reported on code.google.com by jrouff...@gmail.com on 19 Oct 2011 at 9:26

GoogleCodeExporter commented 9 years ago
Thanks for the report, I have to agree that the keys should be quoted. I have 
no explanation for why I didn't make it so when I rewrote the formatter, it 
really is invalid and I apologise for not noticing.

I've added a quick fix for this in r176 that puts hidden quotation marks around 
object keys for correct copy-pasting. It will be included in the next version, 
some time before Firefox 8 moves to release on November 8th. Note I haven't yet 
tested as thoroughly as I'd like since I'm away from the machine with all my 
testing profiles again, so I'll leave this open until I can test more.

Longer-term, I plan to make the formatting (or at the very least, the style) 
completely user-customisable - at that point it will be easy to make optional.

Original comment by W.Elwoo...@gmail.com on 20 Oct 2011 at 1:22

GoogleCodeExporter commented 9 years ago
Hi just popped back to say many thanks for fixing this. Working fine here now.

Original comment by jrouff...@gmail.com on 30 Nov 2011 at 11:12