This is an old revision of the document!


JSON Filetype

Although JSON files aren't terribly common, sometimes you'll have to hand-edit some JSON data, for example when it's used as a configuration file format.

Add this to the filetypes_extensions.conf file ( means existing data):

[Extensions]
...
JSON=*.json
...
 
[Groups]
...
Misc=JSON
...

And create a new filedef named filetypes.JSON.conf with the following contents:

[styling=C]
 
[keywords]
primary=true false
 
[settings]
extension=json
lexer_filetype=Javascript
comment_single=#
comment_use_indent=true
 
[indentation]
width=2
# 0 is spaces, 1 is tabs, 2 is tab & spaces
type=1
Print/export