Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>JSON DeserializerNew to Visual Studio Code? Get it now.
JSON Deserializer

JSON Deserializer

Daniel Chen

|
1 install
| (0) | Free
Recursively deserialize JSON strings into readable, formatted objects with multiline string support
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JSON Deserializer

A powerful VSCode/Cursor extension that recursively deserializes JSON strings into readable, formatted objects.

Features

  • 🔄 Recursive Deserialization: Automatically finds and deserializes all JSON strings nested within your JSON structure
  • 📝 Multiline String Formatting: Converts strings with newlines into readable, formatted multiline strings
  • ⚡ One-Click Operation: Right-click and select "Deserialize JSON" - works on entire files or selections
  • 🎨 Pretty Formatting: Outputs beautifully formatted JSON with 2-space indentation
  • 🔁 Deep Nesting Support: Handles multiple levels of nested JSON strings

Usage

  1. Open a file containing a JSON string (like test.json)
  2. Either:
    • Select the JSON text you want to deserialize, OR
    • Leave no selection to deserialize the entire file
  3. Right-click and select "Deserialize JSON"
  4. The JSON string will be converted to properly formatted JSON in place

Example

Before (nested JSON strings):

{
  "function": {
    "name": "write_file",
    "arguments": "{\"path\":\"/app/test.js\",\"content\":\"function test() {\\n  console.log('hello');\\n}\"}"
  }
}

After (deserialized and formatted):

{
  "function": {
    "name": "write_file",
    "arguments": {
      "path": "/app/test.js",
      "content": "function test() {
        console.log('hello');
      }"
    }
  }
}

Notice how:

  • The arguments string was parsed into an actual object
  • The content string with \n escapes became a readable multiline string

Development

Setup

npm install

Compile

npm run compile

Watch mode (auto-compile on changes)

npm run watch

Running the Extension

  1. Press F5 in VSCode to open a new window with the extension loaded
  2. Open test.json or create a new file with JSON strings
  3. Right-click and select "Deserialize JSON"

Building VSIX Package

npm install -g @vscode/vsce
vsce package

This will create a .vsix file that you can install in VSCode/Cursor.

Installation

From VSIX

  1. Build the extension: vsce package
  2. In VSCode/Cursor, go to Extensions
  3. Click the "..." menu and select "Install from VSIX..."
  4. Select the generated .vsix file

From Source (Development)

  1. Clone this repository
  2. Run npm install
  3. Run npm run compile
  4. Press F5 to launch the extension in debug mode

Requirements

  • VSCode 1.80.0 or higher

License

MIT

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