coaster
coaster copied to clipboard
Move JSON Encoder over from Baseframe
trafficstars
Baseframe currently supplies a JSON Encoder that is used for objects from Coaster. It makes sense to host the encoder in Coaster itself, to sync maintenance, and use a subclass in Baseframe if necessary.
Also, the encoder needs a generic way to handle JSON-aware objects. One possibility: the object has a jsondict method that returns a JSON-castable dictionary. This would be one-way, not supporting reverse construction, but it's fine for info objects like status managers.