This is a Visual Studio Code extension that allows you to view and copy parsed JSON from string literals in your Go code. When hovering over a string literal, it will attempt to parse it as JSON and display it in a formatted manner. A "Copy" link will also be provided to easily copy the JSON content to your clipboard.
Features
Hover over Go string literals containing JSON data to see a parsed, formatted version of the JSON.
Click the "Copy" link to copy the JSON value to your clipboard.
Installation
While not published yet, you can install it manually:
Clone this repository to your local machine.
Open the project in VSCode.
Press F5 to launch a new VSCode window with the extension loaded.
Usage
Open a Go file in VSCode.
Hover over a string literal that contains JSON data.
A hover popup will appear displaying the parsed JSON with a "Copy" link.
Click the "Copy" link to copy the JSON content to your clipboard.
Development
Prerequisites
Node.js
VSCode
Running the Extension Locally
Clone the repository to your local machine.
Open the project in VSCode.
Press F5 to start debugging the extension.
This will open a new VSCode window with your extension installed, allowing you to test it.
Build and Package
Run vsce package to create a .vsix file for distribution.
Contribution
Feel free to fork the repository, open issues, and submit pull requests.
Let me know if you'd like to add anything else to this!