Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>CodeJsonXNew to Visual Studio Code? Get it now.
CodeJsonX

CodeJsonX

guimy

|
3 installs
| (0) | Free
A VS Code extension for formatting, compacting, escaping and unescaping JSON text
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeJsonX

This is a VS Code extension that provides JSON formatting, compression, and text escaping capabilities for developers working with JSON files. This project is developed purely using Qwen Code and Lingma Code Assistant. The development process is in the series of articles published on My Blog.

Features

This extension provides four main features for working with JSON files:

  1. Format JSON: Pretty-prints your JSON with proper indentation and spacing.
  2. Compact JSON: Removes all unnecessary whitespace from your JSON to make it compact.
  3. Escape JSON Text: Escapes special characters in JSON text for use in strings.
  4. Unescape JSON Text: Unescapes JSON text to convert it back to its original form.

All commands can be accessed through:

  • The Command Palette (Ctrl+Shift+P or Cmd+Shift+P)
  • The context menu when right-clicking in a JSON file (under the "CodeJsonX" submenu)
  • The editor title bar menu when working with a JSON file (under the "CodeJsonX" submenu)

Format JSON

Converts compact JSON into a well-formatted, readable format with proper indentation.

Compact JSON

Removes all unnecessary whitespace from JSON to create a compact representation.

Escape JSON Text

Converts regular text into properly escaped JSON text that can be safely included in JSON strings.

Example:

{"a":"x","b":1,"c":true}

Becomes:

{"a": "x", "b": 1, "c": true}

Unescape JSON Text

Converts escaped JSON text back to its original form.

Example:

{"a": "x\nnewline", "b": 1, "c": true}

Becomes:

{"a": "x
newline", "b": 1, "c": true}

Requirements

No special requirements. This extension works with standard VS Code installations.

Extension Settings

This extension does not contribute any VS Code settings.

Known Issues

None at this time.

Release Notes

0.0.1

Initial release with JSON formatting, compaction, escaping, and unescaping features.


Following extension guidelines

Ensure that you've read through the extensions guidelines and follow the best practices for creating your extension.

  • Extension Guidelines

Working with Markdown

You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:

  • Split the editor (Cmd+\ on macOS or Ctrl+\ on Windows and Linux).
  • Toggle preview (Shift+Cmd+V on macOS or Shift+Ctrl+V on Windows and Linux).
  • Press Ctrl+Space (Windows, Linux, macOS) to see a list of Markdown snippets.

For more information

  • Visual Studio Code's Markdown Support
  • Markdown Syntax Reference

Enjoy!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft