JSON – EmEditor (Text Editor) https://www.emeditor.com Best Text Editor, Code Editor, CSV Editor, Large File Viewer for Windows (Free versions available) Fri, 29 Sep 2023 06:47:00 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 Single column with JSON data parsing https://www.emeditor.com/forums/topic/single-column-with-json-data-parsing/ Fri, 29 Sep 2023 06:45:29 +0000 https://www.emeditor.com/forums/topic/single-column-with-json-data-parsing/ Hello,

I would like to parse a column which has json data and expand that into new columns. Is this feasible? How would one go about this?

Sample Data

https://ibb.co/P9JPkfm – Sample Data

I am trying to achieve something like this – https://support.microsoft.com/en-au/office/parse-text-as-json-or-xml-power-query-7436916b-210a-4299-83dd-8531a1d5e945

Thank you for your time and help!

]]>
JSON support for macros would be extremely useful https://www.emeditor.com/forums/topic/json-support-for-macros-would-be-extremely-useful/ Wed, 20 Apr 2016 10:24:38 +0000 https://www.emeditor.com/forums/topic/json-support-for-macros-would-be-extremely-useful/ The brand new EmEditor 15.9 regexp features are very welcome and extremely helpful for making the macro engine lots more powerful!

One more such feature set that is nowadays commonplace and much used in modern “normal Javascript” (in browsers etc) is JSON support. Contrary to what might be the initial reaction, JSON support is extremely well-suited to macros in a text editor like EmEditor, since it very efficiently bridges the gap between textual data and internal-typed data possible to process efficiently with Javascript.

According to this previous thread (https://www.emeditor.com/forums/topic/does-javascript-macros-in-emeditor-only-support-a-subset-of-javascript-standard/), EmEditor does not currently expose the JSON features of modern Javascript versions, but according to this information (https://blogs.msdn.microsoft.com/jscript/2009/04/16/versioning-language-features-in-jscript/) from Microsoft, maybe this would be quite easy to do after all, without even having to use any non-Javascript library for it (which there absolutely exists good ones for too by the way, just like the ones you used for the regular expressions support!)?

Either way, the two core functions of the Javascript JSON capabilities that would be extremely useful to have in EmEditor macros are the JSON.parse() and JSON.stringify() methods, which, respectively, imports textual-only data to internal-type Javascript data, and exports it back to textual form once ready-processed.

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!

]]>
Does Javascript macros in EmEditor only support a subset of Javascript standard? https://www.emeditor.com/forums/topic/does-javascript-macros-in-emeditor-only-support-a-subset-of-javascript-standard/ Mon, 14 Mar 2016 21:21:13 +0000 https://www.emeditor.com/forums/topic/does-javascript-macros-in-emeditor-only-support-a-subset-of-javascript-standard/ I’m trying to implement a JSON-beautifier in an EmEditor macro, but when I attempt to use for example the JSON.parse() method (which is part of the Javascript specification), I only get the following error message:
——————————
‘JSON’ is undefined
——————————
Does Javascript macros in EmEditor only support a subset of Javascript standard, and in that case which parts?

Here is a link to the part of the Javascript reference that documents the build-in JSON object:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON

]]>