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

[Feature Request]: yaml serialization in dumpfn/loadfn for non-standard classes and types #587

Open
1 task done
kirill-push opened this issue Oct 30, 2023 · 0 comments
Open
1 task done

Comments

@kirill-push
Copy link

kirill-push commented Oct 30, 2023

Problem

Hi! dumpfn/loadfn functions work excellent with any class and type when it comes to json. But your part with yaml has no additional processing (like json part) and with some deviations from standard types and classes, dumpfn/loadfn give an error.
For example, I tried to save an element of class Solution (link to repo) in yaml, but unlike json, which did it perfect and only in one line of code, it doesn't work that way here.

Proposed Solution

The only thing that helped me with class Solution was writing custom representators and constructors.
Hence the question - is it possible to fit universal representators and constructors for yaml files into your functions?
I understand that it's easier to say than to do, and I don't have any ideas now how to implement it, but maybe you will succeed

Alternatives

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
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

No branches or pull requests

1 participant