In this article we are using Visual Studio to take the Network Response gathered by inspecting a widget to build the Format Object required to wire up an element in a Kleeen authored application.
To start in Visual Studio create a new file work with the data we found inspecting the elements network response. You can then paste that raw response into Visual Studio. It will look something like this:
Next you will type constFormat= at the beginning of the line of text. Then right click on the text in Line 1 and choose Format Document.
Now that we have a nicely formatted version of our network response we can do a couple of quick clean up steps to make the code ready to use.
- Lines 2 through 4 need to be deleted.
- The text between the brackets [ ] with category and example data needs to be removed to eliminate conflict with actual response data. The result will look like this:
- All of the text starting with the line that says results to the end of the document will be deleted.
- The final comma at the end of the code will be replaced with a semi-colon.
You can now place this code in the beginning of a widgets folder you are wiring up to provide the required format data.