Picture of Milton Plotkin
What editors do you use for course JSON files?
by Milton Plotkin - Friday, 17 August 2018, 9:04 AM
 

Hello all,

Just wondering what editors the Adapt Community was fond of when creating content with it, specifically, which editor do you use when editing course JSON files (like components.json).

We've been using Notepad++, and while its editing tools are terrific, the lack of syntax highlighting complexity (due to most things being a "string") does make details hard to find after looking at it for long periods of time. Even if there's just basic HTML syntax highlighting within the strings, it would already be a huge improvement.

Thanks in advance!

- Milun

Picture of Matt Leathes
Re: What editors do you use for course JSON files?
by Matt Leathes - Friday, 17 August 2018, 10:02 AM
 

Visual Studio Code. It's got automatic JSON error-checking, syntax highlighting, Emmet support for doing quick bits of HTML* or inserting Lorem Ipsum text, a built-in terminal for running your grunt commands - and it's free, open source and totally cross-platform.

*though you have to enable Emmet support for JSON files in the settings

Picture of Milton Plotkin
Re: What editors do you use for course JSON files?
by Milton Plotkin - Monday, 20 August 2018, 1:26 AM
 

Wow, that's an interesting tool. I'll definitely have to do some research into it, but it looks like something that can help us.

Ideally, I'm looking to create a new filetype which our components data will be written to (basically the same as a .json, but allowing for TAB and return characters for readability). Then, I'll hook up a batch script to Grunt which will clean the file of illegal characters and overwrite components.json with valid syntax before the Adapt unit is built. Naturally, before doing that we needed to settle on a good editor.

Thanks for the help! I'll share my method if it works/if there's an interest for it when it's ready (might take a while though).

Thanks again!

- Milun

Picture of Paul Hilton
Re: What editors do you use for course JSON files?
by Paul Hilton - Friday, 17 August 2018, 10:08 AM
 

Hi,

This is probably a daft question, but are you aware there is an Adapt Authoring Tool?

Paul

Picture of Matt Leathes
Re: What editors do you use for course JSON files?
by Matt Leathes - Friday, 17 August 2018, 10:45 AM
 
This is probably a daft question, but are you aware there is an Adapt Authoring Tool?

I have heard it mentioned once or twice, yes ;-)

Picture of Milton Plotkin
Re: What editors do you use for course JSON files?
by Milton Plotkin - Monday, 20 August 2018, 1:12 AM
 

Yeah I'm aware, but it's not quite for our situation unfortunately. We've modified and added so many custom features to our Adapt that the Authoring Tool doesn't quite offer the fidelity we'd need to utilize them. Thanks for the suggestion though!

Picture of C OCaoimh
Re: What editors do you use for course JSON files?
by C OCaoimh - Friday, 7 September 2018, 2:12 PM
 

+1 for Visual Studio Code. 

You can even use a range of spell checkers - typos are easy to miss in the JSON ;( and it can flag them. 

Picture of Matt Leathes
Re: What editors do you use for course JSON files?
by Matt Leathes - Friday, 7 September 2018, 2:55 PM
 

There's also a cool trick you can do to spell-check in the course itself: with the course open in a browser window, open the developer tools by pressing F12, go to the console, then execute the following:

document.body.contentEditable = true;

This command makes all text within the page editable which, in turn, should trigger the spell-checker - in Firefox anyway. In Chrome you have to force a spell-check either by changing a word or via Edit > Spelling and Grammar > Check document now.

Needless to say this trick doesn't work in IE11 ;-) It may work in Edge, I have no way of knowing since the Edge developer tools have been broken for me for several months now.

And obviously if you do edit the text those changes will not be saved!