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

Support UUID serialization #385

Open
Amertz08 opened this issue Mar 14, 2020 · 3 comments
Open

Support UUID serialization #385

Amertz08 opened this issue Mar 14, 2020 · 3 comments

Comments

@Amertz08
Copy link

Seems at least imo UUID serialization should be supported out of the box.

@hugovk
Copy link
Member

hugovk commented Mar 14, 2020

Thanks for the report. Please could you give an example code snippet of what you're expecting? And is this available with the stdlib json? If not, I think it's unlikely to be added.

@Amertz08
Copy link
Author

Hadn't thought to check the builtin json lib. Looks like it's not supported.

As far as code snippet.

>>> ujson.dumps({"key": UUID("abc...")}
'{"key": "abc..."}'

@bauman
Copy link

bauman commented Mar 16, 2020

consider migrating your codebase to use orjson for uuid support instead of ujson?

https://github.com/ijl/orjson

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

3 participants