You are here: PSPad forum > English discussion forum > JSON files support

JSON files support

Goto Page: 1 2 Next

#1 JSON files support

Posted by: zbigniew | Date: 2009-12-07 08:16 | IP: IP Logged

Hi,
I was trying to find syntax file for JSON, but failed.
Was I searching inefficiently or PSPad does not support this format yet?

Regards,
Zbigniew

Options: Reply | Quote | Up ^


#2 Re: JSON files support

Posted by: pspad | Date: 2009-12-07 08:50 | IP: IP Logged

If PSPad doesn't support it yet, create your own syntax via menu setings / User highlighter

Options: Reply | Quote | Up ^


#3 Re: JSON files support

Posted by: zbigniew | Date: 2009-12-08 08:04 | IP: IP Logged

JSON has no keywords, JSON has no comments. sad smiley
It's simplified as much as possible - that was the goal.
Looks like user highlighter is not the valid solution here.

More information: en.wikipedia.org

Zbigniew

Options: Reply | Quote | Up ^


#4 Re: JSON files support

Posted by: Web Devologist | Date: 2009-12-09 01:44 | IP: IP Logged

I suppose you could color the braces and parenthesis different colors, or bold them? :P

Options: Reply | Quote | Up ^


#5 Re: JSON files support

Posted by: ventzy | Date: 2009-12-10 20:17 | IP: IP Logged

JavaScript highlighter will do the trick I suppose

Options: Reply | Quote | Up ^


#6 Re: JSON files support

Posted by: zbigniew | Date: 2011-02-24 10:56 | IP: IP Logged

How?
When I specify [ ] { } : as keywords, they're removed by PSPad - means: cannot define these chars as keywords.

JavaScript highlighter is also not meeting JSON syntax requirements. sad smiley

JSON becomes more and more popular, so I think PSPad should have a support for it...

Zbigniew

Options: Reply | Quote | Up ^


#7 Re: JSON files support

Posted by: pspad | Date: 2011-02-24 11:07 | IP: IP Logged

{} is possible to define as Keyword if you add chars ad keywordchars. [] not.
In my opinion, brackets are not part as keywords.

Options: Reply | Quote | Up ^


#8 Re: JSON files support

Posted by: myf | Date: 2011-02-24 11:55 | IP: IP Logged

It means "JavaScript Object Notation" for a reason. ventzy is right; it is nothing less and nothing more than a javascript object literal with two conventional restrictions: even one-word keys are quoted (hence, its just because of an old IE bug: you cannot use unquoted reserved keywords such as "do", "while" in object literal.), and you cannot use certain value types (regexp object, date object, reference). Thats all.

Options: Reply | Quote | Up ^


#9 Re: JSON files support

Posted by: Gorlash | Date: 2015-01-13 17:41 | IP: IP Logged

Just as an update on this topic, since I'm trying to make a JSON highlighter for pspad now.

JSON *does* have keywords, including "type", "object", "integer", "number", "title", "$schema", "description" and others.

It also has symbols, including , " : { } [ ]
which I would like to have highlighted as symbols, but pspad keeps deleting both types of braces from my ini file, and in any case, it isn't applying *any* of my highlighting to the file.

I've posted a separate message on this topic, but I thought I'd update this thread while I'm at it!!

Options: Reply | Quote | Up ^


#10 Re: JSON files support

Posted by: pspad | Date: 2015-01-13 18:46 | IP: IP Logged

Symbols are highlighted automatically as symbols. There is not necessary to put them into list.

Options: Reply | Quote | Up ^


Goto Page: 1 2 Next





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR