Scripting - JSON Data Writer

While working on a solution which made heavy use of an online API for REST based communication, the solution slowly revealed it had a large number of "specially dedicated" data processing scripts. Many of these scripts were quite normal in the realm of "I have some data, I want to put it into the right place." You know, your typical Go To Layout then Set Field script steps.

The issue, however, was that most all of them did somewhat they same thing - a lot of code duplication. They either put the data into a field on some layout or they moved it into a global variable.

For myself, while developing within any solution, I always try to see where efficiency can be improved and implement as needed. The result of some recent efforts was creating a generalized data writer for JSON based data. It turns out that this solution is quite efficient and allows you to not only reduce your total number of solution scripts, but also makes it quite convenient to provide instructions about where data needs to be stored.

If you enjoy optimizing your solution's method of handling data, then it's very likely you'll benefit from a number of the valuable lessons within this comprehensive video about a JSON Data Writer script.

AttachmentSize
JSONDataWriter.zip1.67 MB