It is pretty common to need support for encoding datetimes or enums when encoding JSON, but this is not supported by the built-in JSON encoder.
It would be useful to provide an enhanced encoder, based on the work done for the assets API.
Originally posted by @llucax in frequenz-floss/frequenz-client-assets-python#38 (comment)
Code: https://github.com/frequenz-floss/frequenz-client-assets-python/pull/38/files#diff-a926da2f3a180c80c78807c0d8f2988fb9b8cfcb70e549239773cc14bf0b374bR14
It is pretty common to need support for encoding
datetimes orenums when encoding JSON, but this is not supported by the built-in JSON encoder.It would be useful to provide an enhanced encoder, based on the work done for the assets API.
Originally posted by @llucax in frequenz-floss/frequenz-client-assets-python#38 (comment)
Code: https://github.com/frequenz-floss/frequenz-client-assets-python/pull/38/files#diff-a926da2f3a180c80c78807c0d8f2988fb9b8cfcb70e549239773cc14bf0b374bR14