extensions icon indicating copy to clipboard operation
extensions copied to clipboard

Format Json Doesn't Work

Open royhenengel opened this issue 1 year ago • 4 comments

Extension

https://www.raycast.com/destiner/json-format

Description

When copying a JSON file's content, even though the content is valid, I get an error "Please copy a valid JSON object."

Steps To Reproduce

  1. On MacOS Version 14.3.1
  2. What configuration are you referring to? Happy to provide it.
  3. Launch Raycast and run the command "Json", choose "Format Clipboard JSON", and paste the contents of this file: config.json
  4. See error: Please copy a valid JSON

CleanShot 2024-02-19 at 13 51 14 CleanShot 2024-02-19 at 13 50 27

Current Behaviour

When copying a JSON file's content, even though the content is valid, I get an error "Please copy a valid JSON object."

Expected Behaviour

Display and format a JSON file's content

royhenengel avatar Feb 19 '24 18:02 royhenengel

Thank you for opening this issue!

🔔 @Destiner @Aayush9029 @devloos @lacherogwu @AlexIsMaking you might want to have a look.

💡 Author and Contributors commands

The author and contributors of destiner/json-format can trigger bot actions by commenting:

  • @raycastbot close this issue Closes the issue.
  • @raycastbot rename this issue to "Awesome new title" Renames the issue.
  • @raycastbot reopen this issue Reopen the issue.

raycastbot avatar Feb 19 '24 18:02 raycastbot

@royhenengel would you mind pasting that JSON snippet as text, to make it easier to test?

AlexIsMaking avatar Feb 19 '24 20:02 AlexIsMaking

Sure, np:

{"paddingVertical":"56px","paddingHorizontal":"56px","backgroundImage":null,"backgroundImageSelection":null,"backgroundMode":"color","backgroundColor":"rgba(171, 184, 195, 1)","dropShadow":true,"dropShadowOffsetY":"20px","dropShadowBlurRadius":"68px","theme":"material","windowTheme":"none","language":"auto","fontFamily":"Hack","fontSize":"14px","lineHeight":"133%","windowControls":true,"widthAdjustment":true,"lineNumbers":false,"firstLineNumber":1,"exportSize":"2x","watermark":false,"squaredImage":false,"hiddenCharacters":false,"name":"","width":"1280"}

Formated:

{ "paddingVertical": "56px", "paddingHorizontal": "56px", "backgroundImage": null, "backgroundImageSelection": null, "backgroundMode": "color", "backgroundColor": "rgba(171, 184, 195, 1)", "dropShadow": true, "dropShadowOffsetY": "20px", "dropShadowBlurRadius": "68px", "theme": "material", "windowTheme": "none", "language": "auto", "fontFamily": "Hack", "fontSize": "14px", "lineHeight": "133%", "windowControls": true, "widthAdjustment": true, "lineNumbers": false, "firstLineNumber": 1, "exportSize": "2x", "watermark": false, "squaredImage": false, "hiddenCharacters": false, "name": "", "width": "1280" }

royhenengel avatar Feb 19 '24 20:02 royhenengel

This issue has been automatically marked as stale because it did not have any recent activity.

It will be closed if no further activity occurs in the next 10 days to keep our backlog clean 😊

raycastbot avatar Apr 10 '24 08:04 raycastbot

This issue has been automatically closed due to inactivity.

Feel free to comment in the thread when you're ready to continue working on it 🙂

You can also catch us in Slack if you want to discuss this.

raycastbot avatar Apr 20 '24 09:04 raycastbot