@File : serializer.py @Time : 2025/04/02 16:00:58 @Author : Alejandro Marrero @Version : 1.0 @Contact : amarrerd@ull.edu.es @License : (C)Copyright 2025, Alejandro Marrero @Desc : None
CustomJSONEncoder
Bases: JSONEncoder
Custom JSON encoder to handle complex types like NumPy arrays and custom objects.
Source code in digneapy/utils/serializer.py
63 64 65 66 67 68 69 70 71 72 |
|
serialize(obj)
Recursively serialize an object to a dictionary. Handles nested objects, lists, and dictionaries.
Source code in digneapy/utils/serializer.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
|
to_json(obj)
Convert an object to a JSON string.
Source code in digneapy/utils/serializer.py
75 76 77 78 79 |
|