JSON and JAVA Syntax Highlighters – Do it in Style?

Here are 7 ways to highlight JSON and JAVA code. The methods are a tad creative – but they need to be because there is no perfect silver bullet solution to highlighting your JSON, JAVA, SQL, JSON-LD, Maven, SBT and ANT syntax.

You Can Highlight JAVA and JSON Syntax

Syntax Highlighting is tough if you don’t know how. Highlighting JAVA code, highlighting JSON data, even highlighting SQL scripts – they all suffer from the same catch 22.

The 7 Syntax Highlighting Problems

Problem 1 – Overly Simplistic

The simple syntax highlighters have just 1 or 2 colours for JSON data, 3 colours (if you are lucky) for JAVA software. That’s too bland, we need to highlight syntax in style.

Problem 2 – Hard to Install

Reasonable syntax highlighters are hard to install. You must add JQuery, CSS scripts and then some. The learning curve (cost) for something so simple is too steep.

Problem 3 – WordPress Plugins Unplugged

For Java and JSON the WordPress Plugins for highlighting JAVA and JSON either don’t work, or are obsolete, or are fledgling efforts with no big name backers. WordPress plugins are good for a great many things – but unfortunately for us – they do not plug the syntax highlighting gap.

Problem 4 – Google’s Self-Centred Guava

Google’s highlighter is great for Guava – but not for Java. JSON and JSON-LD do not get a look-in!

Problem 5 – Escape and Escape Again

escape – Most syntax highlighters require you to escape and escape again. They don’t cut it because we can’t copy and paste code. Escaping right arrows, backslashes and whatnots is overly tedious to do or to automate.

Problem 6 – Unwanted Side Effects

The CSS code that comes with syntax highlighters actually alters your website’s look and feel. Fixing this problem is arduous.

Problem 7 – Look and Feel does not Feature

We want the common syntax highlighting features to come as standard. This includes copy paste, line numbers, and colour coding for each code component In JAVA code the colour codes should denote and delineate method names, variable names, modifiers, parameters, loops, conditionals, import statements, annotations and like that.

The above 7 are the common JAVA slash JSON syntax highlighting shortfalls. But all is not lost. There are 7 creative, simple and stylish ways to highlight JAVA or JSON. That’s for next week.

Leave a Reply

Your email address will not be published. Required fields are marked *