Chapter 14. Exports
Exports are anything that leaves the system for the purpose of importing into another one. Exports of a nonstreaming nature would typically be handled by existing batch processes. Batch processes are configured centrally. If a streaming visualization interface has been created to allow client-side customization of what an analyst can see and what it means, there’s an opportunity to use more perspectives with more evolutionary iterations than any centrally developed processes can provide. This chapter focuses on leveraging those varying perspectives enabled by making the streaming data interactive in a client.
When JSON is being exported from JavaScript, it needs to be converted into a string, as demonstrated in Example 14-1. This is required because ways of sending the information are friendly with strings but not objects (for example, URLs or API POST parameters). Many libraries will do this for you, but it’s important to note—if it’s not done, you could end up with output saying something like “[Object]” and nothing else.
Example 14-1. Convert a JSON object to a string
// assuming objConfig is the JSON object you want to convertvarstrConfig=JSON.stringify(objConfig);// the reverse process, when requiredvarobjConfig=JSON.parse(strConfig);
Configurations
When every analyst can set their own configuration in a way that drastically changes their ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access