{"id":31557000,"url":"https://github.com/drswith/vscode-json-string-code-editor","last_synced_at":"2026-01-20T17:33:42.263Z","repository":{"id":311199305,"uuid":"1042849401","full_name":"Drswith/vscode-json-string-code-editor","owner":"Drswith","description":"A powerful VS Code extension that enhances the editing experience of code snippets embedded within JSON and JSONC files. Edit JavaScript, TypeScript, Python, and other code directly in temporary editor tabs with full syntax highlighting, IntelliSense, and language support.","archived":false,"fork":false,"pushed_at":"2025-08-29T11:05:57.000Z","size":491,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-24T13:59:26.188Z","etag":null,"topics":["formatters","json-schema","low-code","programming-languages"],"latest_commit_sha":null,"homepage":"https://vscode-json-string-code-editor.netlify.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Drswith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["Drswith"]}},"created_at":"2025-08-22T17:18:07.000Z","updated_at":"2025-08-29T11:06:01.000Z","dependencies_parsed_at":"2025-08-22T19:57:52.311Z","dependency_job_id":"e6b6e634-7688-415a-a13d-906ca67c400a","html_url":"https://github.com/Drswith/vscode-json-string-code-editor","commit_stats":null,"previous_names":["drswith/json-string-code","drswith/vscode-json-string-code-editor"],"tags_count":50,"template":false,"template_full_name":null,"purl":"pkg:github/Drswith/vscode-json-string-code-editor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drswith%2Fvscode-json-string-code-editor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drswith%2Fvscode-json-string-code-editor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drswith%2Fvscode-json-string-code-editor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drswith%2Fvscode-json-string-code-editor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Drswith","download_url":"https://codeload.github.com/Drswith/vscode-json-string-code-editor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Drswith%2Fvscode-json-string-code-editor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278386651,"owners_count":25978217,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["formatters","json-schema","low-code","programming-languages"],"created_at":"2025-10-04T23:21:09.611Z","updated_at":"2026-01-20T17:33:42.248Z","avatar_url":"https://github.com/Drswith.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Drswith"],"categories":[],"sub_categories":[],"readme":"# JSON String Code Editor\n\n[![VS Code Marketplace](https://img.shields.io/vscode-marketplace/v/Drswith.vscode-json-string-code-editor.svg?color=blue\u0026label=VS%20Code%20Marketplace)](https://marketplace.visualstudio.com/items?itemName=Drswith.vscode-json-string-code-editor)\n\n[![VS Code Marketplace Downloads](https://img.shields.io/vscode-marketplace/d/Drswith.vscode-json-string-code-editor.svg?color=blue\u0026label=VS%20Code%20Downloads)](https://marketplace.visualstudio.com/items?itemName=Drswith.vscode-json-string-code-editor)\n\n[![VS Code Marketplace Installs](https://img.shields.io/vscode-marketplace/i/Drswith.vscode-json-string-code-editor.svg?color=blue\u0026label=VS%20Code%20Installs)](https://marketplace.visualstudio.com/items?itemName=Drswith.vscode-json-string-code-editor)\n\n[![Open VSX Registry](https://img.shields.io/open-vsx/v/Drswith/vscode-json-string-code-editor.svg?color=c160ef\u0026label=Open%20VSX)](https://open-vsx.org/extension/Drswith/vscode-json-string-code-editor)\n\n[![Open VSX Downloads](https://img.shields.io/open-vsx/dt/Drswith/vscode-json-string-code-editor.svg?color=c160ef\u0026label=OpenVSX%20Downloads)](https://open-vsx.org/extension/Drswith/vscode-json-string-code-editor)\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nA powerful VS Code extension that enhances the editing experience of code snippets embedded within JSON and JSONC files. Edit JavaScript, TypeScript, Python, and other code directly in temporary editor tabs with full syntax highlighting, IntelliSense, and language support.\n\n## ✨ Features\n\n- **🚀 Temporary Code Editor**: Open code strings in dedicated temporary editor tabs with full language support\n- **🎯 Smart Detection**: Automatically detects and recommends the most appropriate programming language based on field names and code content analysis\n- **🌈 Syntax Highlighting**: Full syntax highlighting and IntelliSense for multiple programming languages\n- **🔧 Right-click Integration**: Easy access through context menu in JSON/JSONC files\n- **⚡ Real-time Sync**: Changes in temporary editors are automatically synced back to the original JSON\n- **🧹 Auto Cleanup**: Automatic cleanup of temporary files when editors are closed\n- **⚙️ Configurable**: Customizable field detection patterns and file inclusion rules\n\n## 📦 Installation\n\n### From VS Code Marketplace\n\n1. Open VS Code\n2. Go to Extensions (Ctrl+Shift+X)\n3. Search for \"JSON String Code Editor\"\n4. Click Install\n\n### From Command Line\n\n```bash\ncode --install-extension drswith.vscode-json-string-code-editor\n```\n\n## 🚀 Usage\n\n### Quick Start\n\n**Three simple steps to get started:**\n\n1. **📁 Open a JSON file** with code strings like:\n\n   ```json\n   {\n     \"script\": \"function hello() {\\n  console.log('Hello World!');\\n}\"\n   }\n   ```\n\n2. **🖱️ Right-click** on the string value (not the field name)\n   - Select \"Edit Code in Temporary Editor\"\n\n3. **✏️ Start editing** with full language support\n   - Choose from auto-detected languages\n   - Edit in a new tab with syntax highlighting\n   - Press `Ctrl+S` to save and sync back\n\n### Basic Usage\n\n1. **Open a JSON or JSONC file** containing code strings\n2. **Right-click** on a string value that contains code\n3. **Select \"Edit Code in Temporary Editor\"** from the context menu\n4. **Choose a language** from the automatically detected recommendations (or select manually from the full list)\n5. **Edit your code** in the new temporary tab with full language support\n6. **Save the temporary file** (Ctrl+S) to sync changes back to the original JSON\n\n### Example JSON Structure\n\n```json\n{\n  \"adaptor\": \"const adaptor = require('./adaptor');\\nconsole.log('Adaptor loaded');\",\n  \"script\": \"function processData(data) {\\n  return data.map(item =\u003e item.value);\\n}\",\n  \"code\": \"try {\\n  const result = await fetchData();\\n  return result;\\n} catch (error) {\\n  console.error(error);\\n}\"\n}\n```\n\n### Language Detection\n\nThe extension automatically detects the programming language based on field names and content analysis. The following languages are supported (built-in, not customizable):\n\n**Supported Languages:**\n\n- **JavaScript** (default fallback)\n- **TypeScript**\n- **Python**\n- **Java**\n- **C#**\n- **C**\n- **C++**\n- **Go**\n- **Rust**\n- **PHP**\n- **Ruby**\n- **Swift**\n- **Kotlin**\n- **Scala**\n- **HTML**\n- **CSS**\n- **SCSS**\n- **Less**\n- **SQL**\n- **JSON**\n- **XML**\n- **YAML**\n- **Markdown**\n- **Shell Script**\n- **PowerShell**\n- **Dockerfile**\n- **Plain Text**\n\n**Detection Logic:**\n\n- **Field name analysis**: Fields containing keywords like `sql`, `html`, `python`, `typescript`, etc. are detected accordingly\n- **Content analysis**: The extension analyzes code syntax patterns to determine the most appropriate language\n- **Default fallback**: When language cannot be determined, JavaScript is used as the default\n\n\u003e **Note**: Language detection is built into the extension and cannot be customized by users. The detection algorithms are optimized for common use cases and code patterns.\n\n### Keyboard Shortcuts\n\n- **Ctrl+S** (Cmd+S on Mac): Save temporary file and sync changes back to original JSON\n- **Ctrl+Shift+P** (Cmd+Shift+P on Mac): Open Command Palette to access extension commands\n\n### Tips\n\n- The extension works with both JSON and JSONC (JSON with Comments) files\n- Temporary files are automatically cleaned up when editors are closed\n- Use the Command Palette to manually clean up temporary files if needed\n- The extension respects VS Code's file inclusion/exclusion patterns\n\n## ⚙️ Configuration\n\nAccess settings via `File \u003e Preferences \u003e Settings` and search for \"JSON String Code Editor\".\n\n### Available Settings\n\n\u003c!-- configs --\u003e\n\n| Key                                       | Description                                                     | Type     | Default                                             |\n| ----------------------------------------- | --------------------------------------------------------------- | -------- | --------------------------------------------------- |\n| `vscode-json-string-code-editor.include`  | Glob patterns for files where the extension should be active    | `array`  | `[\"**/*.json\",\"**/*.jsonc\"]`                        |\n| `vscode-json-string-code-editor.exclude`  | Glob patterns for files that should be excluded from processing | `array`  | `[\"**/node_modules/**\",\"**/dist/**\",\"**/build/**\"]` |\n| `vscode-json-string-code-editor.logLevel` | Set the logging level for the extension                         | `string` | `\"info\"`                                            |\n\n\u003c!-- configs --\u003e\n\n### Example Configuration\n\n```json\n{\n  \"vscode-json-string-code-editor.include\": [\n    \"**/*.json\",\n    \"**/*.jsonc\",\n    \"**/config/*.json\"\n  ]\n}\n```\n\n## 🎯 Commands\n\nThe extension provides the following commands accessible via Command Palette (Ctrl+Shift+P):\n\n- **Edit Code in Temporary Editor**: Open selected JSON string in a temporary editor\n- **Edit Code at Range**: Edit code at a specific range\n- **Clean Up Temporary Files**: Manually clean up all temporary files\n\u003c!-- commands --\u003e\n\n| Command                                           | Title                                                  |\n| ------------------------------------------------- | ------------------------------------------------------ |\n| `vscode-json-string-code-editor.editCode`         | JSON String Code Editor: Edit Code in Temporary Editor |\n| `vscode-json-string-code-editor.editCodeAtRange`  | JSON String Code Editor: Edit Code at Range            |\n| `vscode-json-string-code-editor.cleanupTempFiles` | JSON String Code Editor: Clean Up Temporary Files      |\n\n\u003c!-- commands --\u003e\n\n## 🔧 Development\n\n### Prerequisites\n\n- Node.js 16+\n- pnpm package manager\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/Drswith/vscode-json-string-code-editor.git\ncd vscode-json-string-code-editor\n\n# Install dependencies\npnpm install\n\n# Compile the extension\npnpm run compile\n\n# Run tests\npnpm test\n\n# Watch mode for development\npnpm run dev\n```\n\n### Building\n\n```bash\n# Build for production\npnpm run build\n\n# Package the extension\npnpm run ext:pack\n```\n\n## 🔍 Troubleshooting\n\n### Common Issues\n\n**Extension not detecting code fields**\n\n- Verify the file matches the `include` patterns and doesn't match `exclude` patterns\n\n**Temporary editor not opening**\n\n- Make sure you're right-clicking on a string value, not the field name\n- Check that the file is a JSON or JSONC file\n- Verify the extension is activated (should show in the status bar)\n\n**Changes not syncing back to original file**\n\n- Save the temporary file using Ctrl+S (Cmd+S on Mac)\n- Check that the original JSON file is not read-only\n- Ensure the temporary file hasn't been moved or renamed\n\n**Performance issues with large files**\n\n- Use the `exclude` setting to skip large directories like `node_modules`\n\n### Getting Help\n\nIf you encounter issues not covered here:\n\n1. Check the [GitHub Issues](https://github.com/Drswith/vscode-json-string-code-editor/issues) for existing solutions\n2. Enable debug logging by setting `logLevel` to `\"debug\"` in extension settings\n3. Check the VS Code Output panel (View → Output → JSON String Code Editor)\n4. Create a new issue with detailed reproduction steps\n\n## 🤝 Contributing\n\nWe welcome Issues and Pull Requests! For major changes, please create an Issue first to discuss what you would like to change.\n\n### 🚀 Quick Start\n\n1. **Fork the repository**\n2. **Create a feature branch** (`git checkout -b feature/AmazingFeature`)\n3. **Commit your changes** (`git commit -m 'Add some AmazingFeature'`)\n4. **Push to the branch** (`git push origin feature/AmazingFeature`)\n5. **Open a Pull Request**\n\n### 📋 Contributing Guidelines\n\n- 🐛 **Bug Reports**: Use [Issue templates](https://github.com/Drswith/vscode-json-string-code-editor/issues/new) to report problems\n- 💡 **Feature Requests**: Submit feature requests and improvement suggestions\n- 📖 **Documentation**: Help improve documentation and examples\n- 🧪 **Testing**: Add test cases and improve code coverage\n- 🎨 **Code Optimization**: Performance improvements, code refactoring, etc.\n\n### 🏆 Contributors\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003e🌟 Thanks to all the developers who contributed to this project! 🌟\u003c/h3\u003e\n\n  \u003c!-- Contributors Display --\u003e\n  \u003ca href=\"https://github.com/Drswith/vscode-json-string-code-editor/graphs/contributors\"\u003e\n    \u003cimg src=\"https://contrib.rocks/image?repo=Drswith/vscode-json-string-code-editor\u0026max=100\u0026columns=20\" alt=\"Contributors\" /\u003e\n  \u003c/a\u003e\n\n\u003cbr\u003e\u003cbr\u003e\n\n  \u003c!-- Project Statistics Badges --\u003e\n  \u003cimg src=\"https://img.shields.io/github/contributors/Drswith/vscode-json-string-code-editor?style=for-the-badge\u0026color=ff69b4\" alt=\"Contributors Count\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/commit-activity/m/Drswith/vscode-json-string-code-editor?style=for-the-badge\u0026color=00d4aa\" alt=\"Commit Activity\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/last-commit/Drswith/vscode-json-string-code-editor?style=for-the-badge\u0026color=ffd700\" alt=\"Last Commit\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues/Drswith/vscode-json-string-code-editor?style=for-the-badge\u0026color=orange\" alt=\"Open Issues\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/issues-pr/Drswith/vscode-json-string-code-editor?style=for-the-badge\u0026color=blue\" alt=\"Open PRs\"\u003e\n\n\u003c/div\u003e\n\n\u003e 🎨 Contributors display powered by [contrib.rocks](https://contrib.rocks)\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 💖 Support\n\nIf you find this extension helpful, please consider:\n\n- ⭐ Starring the repository\n- 🐛 Reporting bugs and issues\n- 💡 Suggesting new features\n- ☕ [Sponsoring the project](https://github.com/sponsors/Drswith)\n\n## 📚 Related\n\n- [VS Code Extension API](https://code.visualstudio.com/api)\n- [JSON Schema](https://json-schema.org/)\n- [JSONC (JSON with Comments)](https://github.com/microsoft/node-jsonc-parser)\n\n---\n\n**Enjoy coding! 🎉**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrswith%2Fvscode-json-string-code-editor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrswith%2Fvscode-json-string-code-editor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrswith%2Fvscode-json-string-code-editor/lists"}