molsonkiko / JsonToolsNppPlugin

A Notepad++ plugin providing tools for JSON like linting, querying, a tree view, and CSV conversion.
Apache License 2.0
70 stars 9 forks source link

Support Using '#' for Commenting #33

Closed mtlive closed 1 year ago

mtlive commented 1 year ago

Some programs use # as line commenting character, and trying to pretty print such JSON files with this plugin raises a parsing error. May you add it to the commenting characters?

molsonkiko commented 1 year ago

Nobody should do this. JSON stands for JavaScript Object Notation, and the JSONC and JSON5 standards only support JavaScript comments.

If you can get those people to stop doing this, you really should, because they're just abusing the JSON standard in a particularly irritating way.

With that said, this was a pretty easy fix and it didn't meaningfully degrade parsing performance, so here you go.

mtlive commented 1 year ago

If you can get those people to stop doing this, you really should, because they're just abusing the JSON standard in a particularly irritating way.

Noted down. Thank you for pointing this out.