Page 1 of 1

Code Snippets and JSON - Alternatives?

Posted: Wed Dec 20, 2023 2:45 am
by Paul Griffiths
Hi Guys

I think it's generally agreed that the Code Snippet tool doesn't support JSON well (or at all, really). Not differentiating between key and value strings is the main defect IMO.

Before MadCap introduced Code Snippets, I used a third-party web site where you could upload code and get back it back as pretty printed HTML together with a CSS file that you could edit if you wanted different colours etc.

But this was years ago and I can't find that site any more. Does anyone know of something similar? TIA.

Re: Code Snippets and JSON - Alternatives?

Posted: Wed Jan 03, 2024 10:04 am
by trent the thief
Flare uses the AvalonEdit package for syntax highlighting.

But MadCap has not has not included the JSON syntax file in their builds:

https://github.com/icsharpcode/AvalonEd ... /Json.xshd

The file's been in Avalon's Repo for over two years. Why MadCap isn't including it is beyond me.

I put in bugs and enhancement requests against the JSON highlighting and have tinkered with modifying the highlighting DLL, but had inconsistent results so haven't shared.

Please enter bug and enhancement requests against this issue.

https://www.madcapsoftware.com/feedback ... quest.aspx
https://www.madcapsoftware.com/feedback/bugs/

Re: Code Snippets and JSON - Alternatives?

Posted: Tue Jan 16, 2024 4:24 am
by Paul Griffiths
Thanks Trent, this is really useful information.

*sigh* I will certainly add my name to the feature request.

Re: Code Snippets and JSON - Alternatives?

Posted: Tue Jan 16, 2024 3:12 pm
by trent the thief
Great! Hopefully we'll have JSON syntax highlighting in 2024.

Being able to easily add local overrides for styling to match corporate standards and the ability to add local keywords would be make it immensely more useful, but at this point I'd settle for real syntax highlighting.

Screen capping code in an IDE to have the proper highlighting is annoying.