R. David Murray added the comment:
Right, the appropriate thing to do there is to write a custom encoder/decoder
to handle those objects. json only automatically handles types that work like
the fundamental types, and this is a good thing, security-wise :)
--
nosy: +r.david.murray
res
New submission from Sven Slootweg:
When faced with a subclass of int like a psutil constant (such as for process
status), that actually returns a non-numeric string when used with str(), the
JSON module will serialize it as a string without quotes.
An example... Code (Python):
[...] "key": ps