Silly JSONA VS Code extension for switching JSON objects between compact one-line and readable separate-line layouts. Commands
Commands are available for JSON editors from the Command Palette, editor context menu, and editor title menu. They directly replace the current editor content and remain undoable with VS Code Undo. Supported inputThe root JSON value may be an object or an array. With no selection, the innermost JSON object or array containing the cursor is formatted; an array takes precedence over an enclosing object, and arrays may contain strings, numbers, objects, or mixed JSON values. With a selection, objects or arrays whose opening brace or bracket is on a selected line are formatted; nested containers are included through their parent formatting, and unselected lines are left unchanged. The extension supports standard JSON, not JSONC comments or trailing commas. Formatting re-serializes the document, so original whitespace and some textual representations are not preserved. The current line ending, indentation style, and final newline are retained where possible. |