Simplify object serialization before JSON encoding (#1871)
* fix: check for helper functions for unsafe encode before falling back to safe encoding
* feat: merge _encode and _unsafe_encode into simple serialization function to avoid immediate json.loads after json.dumps
* fix: use function instead of a serializing class without trying to serialize keys that are unhashable or unsupported
* feat: lazily evaluate serialized value based on key validity
* feat: use dictionary comprehension and predefined compatible types
* fix: handle enum types immediately after dicts
* fix: return stringified object as a default
* doc: update function docstring for serialize_to_dict
* fix: rename serialize_to_dict to jsonify as it serializes to other primitive types as well
0 files changed, 0 insertions, 0 deletions