ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

CSON Converter

by idleberg ST3

Convert JSON to CSON, and vice versa.

Labels converter, cson, json

Details

Installs

  • Total 744
  • Win 291
  • Mac 366
  • Linux 87
Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11 Apr 10 Apr 9 Apr 8 Apr 7 Apr 6 Apr 5 Apr 4 Apr 3 Apr 2 Apr 1 Mar 31 Mar 30 Mar 29 Mar 28 Mar 27 Mar 26 Mar 25 Mar 24 Mar 23 Mar 22 Mar 21 Mar 20 Mar 19 Mar 18 Mar 17 Mar 16 Mar 15 Mar 14 Mar 13 Mar 12 Mar 11
Windows 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 0 0 0 1 0 0 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

CSON Converter

The MIT License GitHub release Travis

Converts CSON, JSON and XML

Installation

Package Control

  1. Make sure you already have Package Control installed
  2. Choose “Install Package” from the Command Palette (Super+Shift+p)
  3. Type Converter and press Enter
  4. Repeat steps 2 and 3 to install “Better CoffeeScript”

With auto_upgrade enabled, Package Control will keep all installed packages up-to-date!

Manual installation

Since package dependencies are handled by Package Control, manual installation is not advised! If you still want to install from source, you probably know what you are doing so we won’t cover that here.

Usage

The Command Palette currently offers the following commands:

  • Convert: CSON to JSON
  • Convert: CSON to XML
  • Convert: JSON to CSON
  • Convert: JSON to XML
  • Convert: XML to CSON
  • Convert: XML to JSON

Note: Since conversion is based on scope, make sure the a supported CoffeeScript package is installed as well. Using Better CoffeeScript is recommended, though CoffeeScript, IcedCoffeeScript and Mongoose CoffeeScript are also supported.

Keyboard Shortcuts

The following examples all use the macOS shortcuts, for Linux or Windows use Ctrl+Alt rather than Cmd+Alt.

Memorizing the keyboard shortcuts for conversion is easy. Just think of C for CSON, J for JSON, and X for XML:

Action Mnemonic Shortcut
CSON to JSON “C to J” Ctrl+C, Ctrl+J
CSON to XML “C to X” Ctrl+C, Ctrl+X
JSON to CSON “J to C” Ctrl+J, Ctrl+C
JSON to XML “J to X” Ctrl+J, Ctrl+X
XML to CSON “J to C” Ctrl+X, Ctrl+C
XML to JSON “J to X” Ctrl+X, Ctrl+J

Settings

Some of the default conversion settings can be modified from the Package Settings menu:

  • Indentation level (int)
  • Sort keys (boolean)

License

This work is licensed under the The MIT License.