SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Topic started by: redcar on March 31, 2021, 08:20:15 am

Title: Problem with parentheses matching
Post by: redcar on March 31, 2021, 08:20:15 am
Paste the following text into an empty JSON document and see if the matching of the curly and square brackets works as expected.  It doesn't for me.


{
    \"ID\": 256,
    \"Things\": [
        {
            \"Thing\": 1,
            \"Group\": {
                \"What\": \"AllOf\",
                \"Who\":
                [\"АБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗ\",
                        \"АБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗ\",
                        \"АБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗ\",
                        \"АБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗАБВГДЕЖЗ\"]
            }
        }]
}]

Build Date: December 16, 2020   (State file: February 9, 2021)
Emulation: CUA

OS: Linux
OS Version: S
Kernel Level: 3.10.0-1160.21.1.el7.x86_64
Build Version: #1 SMP Tue Mar 16 18:28:22 UTC 2021
Processor Architecture: x86_64


Title: Re: Problem with parentheses matching
Post by: Clark on March 31, 2021, 01:43:02 pm
Notice that the color coding for this JSON document does not look right. That is why parenthesis matching doesn't work.

As far as I can tell, code like the following is NOT a valid string.
Code: [Select]
\"whatever\"

You can change SlickEdit's color coding. Go to Options>Languages>Web Authoring Languages>JSON>Color coding>Tokens Tab.

Remove the "Escape char" for the double quoted string.

Once the color coding of strings works for odd JSON like this, the parenthesis matching will work.