You are here: PSPad forum > English discussion forum > 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
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
Posted by: zbigniew | Date: 2009-12-08 08:04 | IP: IP Logged
JSON has no keywords, JSON has no comments.
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
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
Posted by: ventzy | Date: 2009-12-10 20:17 | IP: IP Logged
JavaScript highlighter will do the trick I suppose
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.
JSON becomes more and more popular, so I think PSPad should have a support for it...
Zbigniew
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.
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.
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!!
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.
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