#E Json editor with schema and templates

#E (sharpE) Json editor with schema and templates

I have been working on a little side project #E or SharpE, it is an Editor which I am hoping will making StoneHearth mods easier.

It has 3 main functions to help you.

  1. Realtime json evaluation
  2. Autocomplet in json
  3. Templates (Scripts)

#Realtime json evaluation
The evaluation of json is split in two parts. One it validates if the file is correct json.
This will help when you forgot a comma or simular. This will be marked in the left margin in red.

The second part is validation against a schema.
This can be used to test if you are missing something or have asigned an in to a value that should be bool.
This will offcouse require that some one writes a schema, for the files that you editing.

Autocomplet in json is normaly restricted to surgest from words allready in the file.
When you have a schema in the file you know what keys to expec.
I have also extended the normal json schema to include some autocomplete definitions of what a value field is.
For example a file, an enum or event a set of keys collected from an other file.

#Templates (Scripts)
This is for now a simple scripts with 5 different commands that can make it easier to create new files for your mod.

*It can copy a file.
*Create folder
*Replace string in the file.
*Insert a string in a file.
*And last it can inject content in to a json file.

When the template is opened it you can edit parameters easy and hit run.

I have recorded a short video that shows how easy i create a mode with a single object.
Normaly you would offcouse replace the image and qb file and edit the description but that is about it. Sorry for the poor quality and no sound.


#Download and setup
Editor can be downloaded at https://github.com/grarup/SharpE/releases/download/0.1/sharpE_0_1.zip

And schemas and templates for Stonehearth at https://dl.dropboxusercontent.com/u/10294497/stonehearth%20schemas%20and%20templates.zip.

After you have installet the editor and unziped the schemas you will need to edit the settings to point to these.

Click the “Settings->General” this opens the settings.json
Under schemas and templates the paths to where you unziped them.
It should look something like this.

	"$schema" : "generalsettings.schema.json",
	"schemas" :	[
		"C:\\Users\\peter_000\\Dropbox\\stonehearth schemas",
	"templates" : [
		"C:\\Users\\peter_000\\Dropbox\\stonehearth templates"
	"converttabs" : true,
	"tabsize" : 2,
	"shortcuts" : [
			"gesture" : "ctrl+s",
			"command" : "Save"
			"gesture" : "ctrl+p",
			"command" : "OpenFileSearch"
			"gesture" : "ctrl+tab",
			"command" : "ShowSwitchFile",
			"gesture" : "f5",
			"command" : "Run"
			"gesture" : "ctrl+shift+f",
			"command" : "FindInFile"
	"editors" : [
	"runpath" : "",
	"runparameters" : "",

The code for the editor can be found at

A trello board on work jet to be done can be found at

The editor is still in its infent state so be gental, but as Stonehearth modders you should have surden class and thick hide.

I am looking forward to hearing your comments and surgestients.
Do keep in mind that this is a project I can work on in my spare time, that isn’t other wise ocupied.
Winter is comming and in Florida that actualy means less time in front of the computer.

One last thing, I created a quick qb viewer for the editor. Just because I need something to play with when every thing else and me needed a break.


A nice thing I would like to see compatible with this project is a Notepad++ plugin~

Well I had been thinking about writing a plugin for sublime text. But both task seems a little large to start on. But the code is on github so steal away. The json validation part is in a project for it self and can easily be reused.


I have made a new release. This has two main changes

  • Layout
  • Commandline

The release can be found here https://github.com/grarup/SharpE/releases

I have made a new release that makes it possible to show more than one file at the same time in different layouts.

In the command line it is now possible to open file, set layout, open folder and validate file.


Man keep this going on

Edit. I tested, i saw the video, try to load the schemas and templates and i failed. The second version failed to open to me. but you got it right, continue this project, don’t give up this could become something big for Stonehearth modding.