Exporting Data
Targeting systems that do not understand Stof (yet).
Just like a lot of data is not defined as Stof, a lot of systems are unaware of Stof, but aware of some other form of data.
Stof formats export data just as easily as they import data!
In this example, we'll import some data, mutate it a little, and then export it in another standard interchange format.
This simulates receiving data (either from a file, API, etc.), parsing it into a Stof interface as an interchange transform step, and then exporting it to a binary stream or string to use in another API call. The same transform step would be valid in preparing this document to be used directly by an application, however, we are demonstrating the "stringify" and "blobify" functions found in the Standard Library.
Make sure to install the Stof CLI and use the "run" command to test this function.
Take a look at the Object Library and the Stof Language Reference for more information on the "renameField" function and "drop" statement used in this example.
Last updated