Closed ryanhiebert closed 7 years ago
I'll note that the new function being introduced here is an internal one, not an external interface. Thus, I won't find the need to keep it for backward compatibility if it proves a hassle in the future. Still, for people willing to live with that possibility (like myself), it's nicer to have it separated from the json encoding so that I can use it directly.
First, make the fallback quantity 0, which is what is advised by HireFire. That the string
'null'
even works is a fluke of implementation, and 0 is the right default to have.Then, split up the JSON encoding from the payload generation. This makes it possible to interface with with a defined function to get the data that HireFire collects, without having to un-encode it to use it in Python.