Copyright 2016 Scott Michael Doctor
NousMind, NousCrypt, and NousRandom are trademarks of Scott Michael Doctor
Most of the API processes have common options regarding how the results are formatted. This section describes the common options. Each process may have other options which are explained in those sections. This reference covers just the common options.
All results are sent as lines of text. The only non-text control characters used are the carriage return and line feed characters (CRLF). All text lines end with CRLF (0x0d, 0x0a). This is the most universal way to end a line of text. The last line of the results always ends with a CRLF. All other characters sent are ASCII alphabet, numbers, and a few of the common punctuation characters. The only exception is with the List Scrambler which accepts UTF-8 characters, which is your text as supplied to the scrambler.
The default is the results sent as a basic web page. The results are wrapped in a basic set of HTML tags. These tags facilitate proper display in web browsers. The tags are as follows:
<!DOCTYPE HTML><html><body><pre>[results here]
The <pre> tag tells the web browser that the text is preformatted and to display it as received. Without that tag, the results often display as a long line.
The HTML tags are not used if the results are returned as a file.
nohtml -- Disables sending the HTML tags.
astextfile -- Sends the results as a text file typically with a csv extension. The filename is in the following format:
All of the file names begin with the four characters nrf_
The ### is a number generated by the API. The number is a combination of an internal process number and the time-code at the start of the process. This guarantees that no two file names will ever be the same. The numbers will forever get bigger so the numbers are representative of the age of the file.
Some processes may have a different extension depending on the options chosen. For example, the Random Integers process can send the results as a binary file. That file will have the extension binary instead of csv. See the details for each process regarding any variations from the common operation. Files that contain a JSON array will have the extension json.
Most of the operations provide five options how to format the results. The default is a single space between columns. The following are the commands for the five options.
space -- This is the default. Each column is separated by a single space character (0x20).
csv -- Each column is separated by a comma. If the results are returned as a single column, no commas will be used. The last column of a line is terminated with a CRLF, not a comma.
csvq -- each result is surrounded by the double quotes character (0x22) and each column is separated by a comma. If the results are returned as a single column, no commas will be used. The last column of a line is terminated with a CRLF, not a comma.
json -- The results are organized into the specified number of columns. The columns are for display purposes only. Each entry is separated with a comma. With a JSON array, a line termination (CRLF) is seen as white space. The last entry of a line will have a comma. Only the last element of the array does not have a comma. The JSON array format is as follows:
jsonq -- This command is the same as the json command except each result is surrounded by the double quotes (0x22) character.