Menu

#268 TCoolEdit: Syntax highlighting for JSON files

8
open
CoolPrj (17)
1
2025-10-04
2025-09-19
No

JSON files are a modern alternative to XML files. They are pretty much used in internet communication (as response to http requests). Adding a JSON parser to CoolProj will allow developers to work more easily.

See: "CoolEdit in C++Builder 10.x" [discussion:d005538c39].

Related

Discussion: AI obsoleting OWLNext
Discussion: d005538c39

Discussion

  • Erwin Lotter

    Erwin Lotter - 2025-09-25

    Hi Sebastian,

    I just integrated your XML and JSON parsers in branch-7-coolprj-dev ([r8461]) with a few minor adjustments.
    One of these was the (preliminary) mapping of COLORINDEX_SINTAXCHECK to TCoolTextBuffer::TColorIndex::Preprocessor because at some point in the past I eliminated TCoolTextBuffer::TColorIndex::SyntaxCheck since it was not used anywhere.
    Is that ok or do you have another suggestion?
    Btw., what stands COLORINDEX_SINTAXCHECK for?

    I don't work with XML and JSON myself, so I was only able to take a cursory look at it. But basically, it works.
    One thing I noticed, though: The first element of JSON arrays is displayed differently than the following elements. Is this correct?

     

    Related

    Commit: [r8461]

  • Sebastian Ledesma

    Hi Erwin:

    Good to know that XML and JSON will be in OWLMaker.

    1 - COLORINDEX_SINTAXCHECK is destined to syntax errors, for example when a line ends with an unclosed string. As alternative it can be use COLORINDEX_ERROR.

    One thing I noticed, though: The first element of JSON arrays is displayed differently than the following elements. Is this correct?

    2 - I have to fix that.

     
  • Erwin Lotter

    Erwin Lotter - 2025-09-25

    Good to know that XML and JSON will be in OWLMaker.

    OWLMaker is a different story.
    branch-7-coolprj-dev is my attempt to get a stable version 7 implementation with some extensions like redo and multi cursor editing.

    As alternative it can be use COLORINDEX_ERROR.

    Good, I will change that.

     
    👍
    1
  • Sebastian Ledesma

    [r8463] has some improvments on JSON parsing.

     

    Related

    Commit: [r8463]

  • Erwin Lotter

    Erwin Lotter - 2025-09-26

    There still seems to be an issue with arrays, see attached image.

     
  • Vidar Hasfjord

    Vidar Hasfjord - 2025-09-26

    @sebas_ledesma committed a JSON parser implementation based on the old code base in [r8427].

     

    Related

    Commit: [r8427]

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB