-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax validation and crash issue with error form #60
Comments
Have you tried automatically checking for errors after editing ( You may also wish to make the parser very strict so it doesn't tolerate any errors according to the original JSON specification. To do that, you can set the If you don't need automatic syntax validation, and you just want to be able to easily re-validate the document on demand, you can open the error form, click the form, and press I strongly recommend installing v7.1 if you haven't already done so. It sounds like you're using a pretty old version of the plugin. |
Thanks for the quick respone. You are right, I was on 6.1. The problem was that Notepad++ itself needed an update to provide me the newest version of Json Tools. Now I'm on 7.1 Using the error form and re-validate with Enter seems to work for me. The XML Tools plugin has a menu item "Check XML syntax now" which to me seems a little more intuitive than having to remember selecting the form and pressing Enter. A different problem is, however, that bringing up the error form after confirming the message box crashes Notepad++ for me. Maybe it's the race condition you were talking about. I will do some more tests and post another issue about that. |
Thank you for pointing that out! I never noticed this crash bug before, or I certainly would not have released version 7.1 without fixing it. I believe I have fixed this issue with my most recent commit. You might try downloading this github actions artifact to see if that fixes your issue. I would like to release a fix to the plugin manager as soon as I am confident that the issue is really fixed.
I agree, and my new commit has a new syntax-checking command to address this complaint. |
Thanks so much, that new function is really helpful. I somehow can't get the error box to automatically appear. But I had this problem already with 7.1. Regarding the crash: |
Thanks for testing! I'm glad you're not seeing the crashes anymore.
Yes, I couldn't figure out how to keep Notepad++ from crashing if the error form was opened from a message box that came from the automatic validation, so I made it so that the automatic validation can't create that message box. Sorry. It is possible to avoid this issue, but the only way I know of involves creating an empty invisible form when JsonTools first starts up (for reasons I don't want to get into, it's weird C# stuff). I've tried that approach, and the form briefly appearing and flashing out of view when Notepad++ starts is annoying and noticeably slows down startup time, so unless I can come up with a less irritating solution, I will keep that feature removed. |
It's fine for me :-) Bringing up message boxes during typing reminds me of the Excel VBA editor that pops up message boxes complaining about syntax errors and makes me yell back "Yeah, I know it's wrong, I'm not yet done!!!" ;-) |
@nicolasr75 Thanks again for your help! |
It's been a week since Notepad++ 8.6.6 went live with JsonTools 7.2 in the plugin manager, and nobody's reported that this issue still exists, so I'm declaring it fixed. |
First of all thanks for this great plugin, a lot of useful functions!
I might be missing something but what I'm actually looking for is a simple syntax validation.
Background is this: some of the users of my software need to edit JSON content. I recommended them to use Notepad++ with the JSON Tools plugin. They should edit their JSON in Notepad++ and afterwards copy it to my software. The question is: how could they perform a syntax check before that? Opening the JSON tree viewer will check for errors but is there a more direct way to do it?
The function "See most recent syntax errors..." seems to keep previous errors even if they have been resolved.
The text was updated successfully, but these errors were encountered: