JSON editor in a nutshell: Open or create a JSON document

There are several ways to create a new JSON file or to open already existing JSON data in JSONBuddy. In this article, I want to briefly show how to start editing JSON in the editor in the following ways:

  1. The “New” command (Ctrl-N)
  2. Create a new JSON schema with “File | New… | JSON schema”
  3. Generate a new sample JSON document from any schema at schemastore.org
  4. Create sample JSON data from a schema loaded in the editor
  5. Open multiple documents from the built-in File Explorer

1. The “New” command

This is the usual “New” command as you know it from any other text-based editor. Of course, you can also quickly invoke it with Ctrl-N. It immediately opens a new JSON document and sets the focus to the active view. However, there is something special to mention about it in JSONBuddy. As JSONBuddy also supports a Grid view on editing JSON, you can set the default view for any new document in the editor settings. You can find more details about the options to set the default view for each text format here.

2. Create a new JSON schema with “File | New… | JSON schema”

Are you working with JSON schemas a lot? Save time and create a new JSON schema in the editor with the “File | New… | JSON schema” command. You can also assign a keyboard shortcut (like Ctrl-Alt-N) on the “Keyboard” page of the “Tools | Customize…” dialog to the menu item. The benefit of the new JSON schema command is, that it already fills the schema content with some template text and marks the document as “JSON schema”. So you don’t have to do this on creating a new schema.

3. Generate a new sample JSON document from any schema at schemastore.org

JSONBuddy can load any JSON schema available at schemastore.org in the editor as a document. Those schemas are a great resource to learn how others are designing JSON data and the related specifications. But JSONBuddy also provides an easy method to quickly generate a sample JSON instance from a schema from schemastore.org. Just set the check-box on the “File | Open from JSON schema library…” dialog:

Open from JSON schema library and create instance
Open from JSON schema library and create instance

4. Create sample JSON data from a schema loaded in the editor

You can also create sample JSON data as a new document from the active JSON schema in the editor with the “JSON | Generate sample document from JSON schema” menu item. Did you also notice, that the Preview window always shows updated JSON sample data while you are editing your schema in JSONBuddy?

5. Open multiple documents from the built-in File Explorer

JSONBuddy comes with a convenient built-in File Explorer window beside the standard Open command (Ctrl-O) to load files from disk. A usual way is to select multiple files in the explorer and to open them at once in the editor. This is not very special. But one of the best features of the built-in File Explorer in JSONBuddy is the folder history. The editor remembers the last folder paths from where you opened documents and you can browse this history by just typing in the current path edit field:

Search file explorer folder history
Search file explorer folder history

A simple and fast way to find all your recent JSON documents.

One Comment

Comments are closed.