notepad-plus-plus / notepad-plus-plus/notepad-plus-plus

JSON Highlighting broken

Open
#11,214 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scintilla dependent
Dominant language
C++
Stars
29.4k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Description of the Issue

Json files of all kinds are not highlighted properly. The names of values in an object are orange and everything else is just black.

Steps to Reproduce the Issue

Versions i tested: v7.8.7 , v8.2.1

  1. open json file or open new document and change highlighting style to json
  2. observe text [1,2,3,4,true,false,null,"aaaa"]

example image of broken highlighting https://i.imgur.com/iWNMCyv.png

Expected Behavior

numbers, booleans, null and strings be colored differently

Actual Behavior

its all colored black.

Debug Information

Notepad++ v8.2.1 (64-bit)
Build time : Jan 19 2022 - 18:43:05
Path : D:\Program Files\Notepad++\notepad++.exe
Command Line :
Admin mode : ON
Local Conf mode : OFF
Cloud Config : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.867
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll NPPJSONViewer.dll

and

Notepad++ v7.8.7 (64-bit)
Build time : Jun 5 2020 - 02:38:56
Path : C:\Program Files\Notepad++\notepad++.exe
Admin mode : ON
Local Conf mode : OFF
OS Name : Windows 10 Pro (64-bit)
OS Version : 2009
OS Build : 19042.1466
Current ANSI codepage : 1252
Plugins : mimeTools.dll NppConverter.dll NppExport.dll

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the JSON highlighting problem in Notepad++ v8.2.1 using the sample [1,2,3,4,true,false,null,"aaaa"] and the JSON highlighting style. Trace the JSON syntax-highlighting implementation from that behavior, then verify that numbers, booleans, null, and strings receive distinct colors without regressing object-name highlighting.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, json
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.