You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even though the issue is in oteapi-services, maybe the correct place to add an option for the user to provide a custom JSON encoder is in SessionUpdate in oteapi-core.
If the strategy developer makes sure that the SessionUpdate always is JSON serialisable, the session should also be serialisable. However, it might require to introduce a new Session class.
The text was updated successfully, but these errors were encountered:
It might still be relevant depending on the data types utilized in strategy specific configurations, however, I see no issue setting a hard restriction on this for strategy (read plugin) developers to support the default JSON de/-encoder from the built-in json Python module?
In the end, pydantic offers great control of how a model is parsed to JSON through its serialization mechanism. See for example this part in the pydantic documentation.
Even though the issue is in oteapi-services, maybe the correct place to add an option for the user to provide a custom JSON encoder is in SessionUpdate in oteapi-core.
If the strategy developer makes sure that the SessionUpdate always is JSON serialisable, the session should also be serialisable. However, it might require to introduce a new Session class.
The text was updated successfully, but these errors were encountered: