This module exposes the default JSON encoder for analytics telemetry
encodeModel uses Analytics.Parser's encodeFlat function
NOTE : If an error is encountered during parsing following JSON is returned -- { "type": "ModelParseError", "value": "ModelParseError" <RawString> }
encodeAction takes a string and encodes it to JSON of the following format
NOTE : only custom types can be encoded, others will result in an error JSON -- for example if I try to encode Int 5 encodeAction <| Debug.toString 5 -- it will result in -- { "type": "ActionTypeError", "payload": "Please change Msg type to Custom Data type in Elm app" }