json.pizza icon indicating copy to clipboard operation
json.pizza copied to clipboard

Add ability to minify JSON

Open rijkvanzanten opened this issue 4 years ago • 2 comments

I oftentimes use https://json.pizza to edit JSON values that stored (minified) in a database. Currently, I can copy and paste my JSON into json.pizza, hit CMD+enter, and make my edits. However, I am missing a step in my workflow: making the beautified JSON minified again.

What are your feelings on having the ability to "un-format" the JSON as well @kritzware? I can provide a PR of course.

rijkvanzanten avatar Nov 21 '19 18:11 rijkvanzanten

Hi @rijkvanzanten, apologies for the delay on a response.

I'm into having this extra functionality. In terms of UI, we'll need a new action button, or perhaps a new button which triggers a dropdown, where in the future we can add more actions.

kritzware avatar Dec 02 '19 11:12 kritzware

I think a second "big" button for now will do. When a new action comes in, we can revisit our options.

Also, what are your thoughts on the copy button? I feel like the primary action buttons that modify the value (format / minify) should be in the bottom right, but copy isn't a content-modifier.

(I'm also wondering how many people would use the mouse to click that button to begin with. I would assume most people use CMD+A (select all) + CMD+C (copy)?

rijkvanzanten avatar Dec 02 '19 15:12 rijkvanzanten