Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for custom JSON encoders for serialising of the session #79

Open
jesper-friis opened this issue Mar 8, 2022 · 1 comment

Comments

@jesper-friis
Copy link
Contributor

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.

@CasperWA CasperWA self-assigned this Mar 16, 2022
@CasperWA CasperWA removed their assignment Jan 18, 2024
@CasperWA
Copy link
Contributor

I am unsure whether this is still relevant.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants