arnav-kr / json-formatter

A Browser Extension to format JSON in the browser automatically. Available with 60+ Themes, Syntax Highlighting, automatically linkifies links and more.
https://json-formatter.js.org
MIT License
71 stars 13 forks source link

Bug: Properties with an empty dictionary "{}" will appear as "[object Object]" / "flex-shrink: 0;" should be added to the ".json-key" CSS class #13

Closed tsukumijima closed 11 months ago

tsukumijima commented 1 year ago

Is there an existing issue for this?

Describe the bug

Properties with an empty dictionary "{}" will appear as "[object Object]".

Also, "flex-shrink: 0;" should be added to the ".json-key" CSS class. I am a Japanese speaker and in Japanese there is no space between words, so if a value is long and spans multiple lines, the width of the key may be pushed to the value, causing the key to break lines as shown in the image. You can solve this problem by simply adding the CSS "flex-shrink: 0;" to the .json-keys CSS class.

Please review the attached screenshots for more details. I really like this extension and would love to see it fixed.

Expected Behavior

No response

Steps To Reproduce

No response

System Info

- OS: macOS 12.6.4
- Browser: Google Chrome 112.0.5615.137

Additional context?

image image image
arnav-kr commented 11 months ago

Fixed By https://github.com/arnav-kr/json-formatter/commit/afc7c7fb2f5bb7922fd12cfbf012e3c3f4643d84