Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Scripting
Viewing all articles
Browse latest Browse all 12244

How to parse Javascript Object Notation in Extendscript?

$
0
0

I noticed in Dr. Brown's Image Processor the following code:

 

dialogResource =  "dialog { text: 'Image Processor', bounds:[100, 100, 480, 540], "

 

which is basically assigning object notation to the dialogResource variable.  Then later in the script you see:

 

mainDialog = new Window( this.dialogResource );

 

Which means Window() takes the object notation and creates a window object using it.  This also means the object notation is being parsed.

 

There's another post that allows you to use the Socket() to pull data right off a website (like a web service), so I am really interested in downloading JSON and turning it into local objects.

 

Any ideas on how to turn JSON into valid objects in ExtendScript?


Viewing all articles
Browse latest Browse all 12244

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>