Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>BSONXNew to Visual Studio Code? Get it now.
BSONX

BSONX

Alper Dogan

|
48 installs
| (0) | Free
Open, compare, export, and save .bson files as JSON in Visual Studio Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

BSONX

BSONX adds a clean BSON editing workflow to Visual Studio Code. Open a .bson file from the Explorer, edit it in the standard JSON editor, compare it against git HEAD as JSON, and save it back to BSON without leaving the normal VS Code experience.

Overview

BSONX reads the source file, converts it to strict Extended JSON, and opens that content in the built-in JSON editor. When you save, the JSON is serialized back into the original .bson file.

This keeps the workflow familiar while preserving BSON-specific types that plain JSON cannot represent safely.

Features

  • Open .bson files directly from the Explorer.
  • Edit BSON data in the standard VS Code JSON editor.
  • Compare .bson changes against git HEAD as strict Extended JSON.
  • Preserve BSON types with strict Extended JSON round-tripping.
  • Save changes back into the original .bson file.
  • Export BSON documents as standalone Extended JSON files.
  • Import Extended JSON files back into .bson files.
  • Work on multiple BSON files at the same time.
  • Avoid normal workspace temp files in the primary editing flow.
  • Keep compatibility with older *.bson.json temp files from previous builds.

Getting Started

  1. Install BSONX.
  2. Open any .bson file in VS Code.
  3. Review and edit the generated Extended JSON.
  4. Save the document to write the result back to BSON.

Compare BSON Changes

The built-in Git Source Control click action still opens the default diff flow. BSONX adds a simpler compare command instead:

  • In the Explorer, right-click a .bson file and run BSONX: Compare With HEAD.
  • In Source Control, right-click a changed .bson file and run BSONX: Compare With HEAD.
  • You can also run the same command from the Command Palette when a BSON file is the current context.

The diff is rendered as strict BSON-safe JSON on both sides so BSON-specific values stay readable.

Export And Import

  • BSONX: Export JSON... writes the current BSON document to a .json file.
  • BSONX: Import JSON Into BSON... converts a .json file back into a .bson file.
  • BSONX: Save BSON remains available from the Command Palette, but normal save already writes changes back to the source BSON file.
  • Export and import stay as secondary actions in Explorer context menus instead of occupying the editor toolbar.

Best For

BSONX works well for save files, config files, and other single-document BSON payloads that you want to inspect or modify with standard editor features such as search, folding, formatting, undo, and diff-friendly text views.

BSON Type Support

BSONX uses strict Extended JSON so BSON-specific values remain explicit instead of being flattened into plain JSON. Common values such as object IDs, dates, and 64-bit integers are preserved through open and save operations.

Notes And Limits

  • The root BSON value must remain a JSON object.
  • Invalid JSON cannot be saved back to BSON.
  • Unsupported root shapes are rejected on save.
  • The main workflow uses an in-memory virtual document backed by the original source file.
  • BSONX adds a dedicated compare command because VS Code's default Git click behavior is not replaced by custom editors.
  • BSONX uses strict Extended JSON under the hood even though the visible commands are labeled simply as JSON.

Why This Feels Native

BSONX does not replace the editor with a custom data-entry surface. It redirects .bson files into the regular JSON editing experience, so you keep the tools you already expect from VS Code.

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