Serialization Specification
Once a JSON-formatted mission object has been defined, it can be serialized using the following algorithm:
To serialize a defined JSON-formatted mission object
1. Create a payload string consisting of the following elements concatenated together:
2. Magic header value: &*3$e1@E
3. Version header value: 001
4. The JSON-formatted mission (as described above), encoded in UTF-8. The equivalent of calling, in Javascript, JSON.stringify(myMissionObject).
5. GZIP compress (
RFC-1952) the payload string.
6. Optionally encrypt the compressed result using the technique described below.
7. Encode the compressed and optionally encrypted result in Base91 format. This value is the serialized mission payload.
This serialized mission payload can either be written to a file (ending with the .ice suffix), or used to produce a QR code. Be aware that QR codes can encode no more than 2,953 bytes of data; if the length of the serialized mission payload exceeds this constant, the Mission is too complex to be represented as a QR code.
1. When a deflection URL is desired, the binary data to be encoded by the QR code is equal to the deflection URL, followed by a forward slash and two question marks (/??), then the base91-formatted result generated in the previous step. For example, http://www.dillonkane.com/??<base91-data>.
2. When no deflection URL is needed, simply create a binary QR code from the base91 encoded data.
A deflection URL hides the Mission data inside of an ignored query string parameter of a URL. This has the effect of making it seem to standard QR code that the QR code simply encodes a URL. Most will simply open a browser to site referred to by the deflection URL.