April 20, 2016 at 3:24 am #20769
The brand new EmEditor 15.9 regexp features are very welcome and extremely helpful for making the macro engine lots more powerful!
I really hope that you would consider adding support for these JSON methods in the EmEditor macro engine, just like you just added regexp support in 15.9!
If the recently added regexp support in EmEditor 15.9 just doubled the usefulness of EmEditor macros, adding JSON support would (at least) double it again, I’d say!April 20, 2016 at 2:15 pm #20777
I just noticed that you had replied recently in the referenced thread above, about ongoing attempts to activate the full JScript 5.8 feature-set in the EmEditor macro engine (according to the details in my other MSDN link here above), and I’m now awaiting a reply about the status of this work in that thread. Sorry for the confusion!April 20, 2016 at 3:54 pm #20778
Actually, the JSON object is already defined on EmEditor v15.9.0.
Can you try on your computer, and see if there any issues?
Thanks!April 21, 2016 at 5:42 am #20781
I’ve tried it now and it works great!
Here is the full source code of my new JSON beautifier macro:
document.selection.Text = JSON.stringify(JSON.parse(document.selection.Text), null, '\t');
Thanks a lot!
The email notifications from your forums started working for me again yesterday, did you do something about them, or did they just fix themselves in a very well-timed fashion?April 21, 2016 at 7:11 pm #20787
I added information about JSON to the History page of the Help, the latest feature page of the website, and I posted a new blog about the feature.
As for email notifications, I didn’t change anything, but we constantly update WordPress, so it is possible that there might have been glitches in some version of WordPress.
Thanks!July 26, 2016 at 6:30 am #20993
document.selection.Text = JSON.stringify(JSON.parse(document.selection.Text), null, ‘\t’);
I tried this macro and it just says “Syntax Error”. Are there prerequisites I’m missing?July 26, 2016 at 6:31 am #20994
Nevermind, I wasn’t thinking…
document.selection.SelectAll();before your code and now it does what I was expecting (I’m using this for entire documents).
You must be logged in to reply to this topic.