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 for ujson #72

Open
celestianx opened this issue Feb 2, 2017 · 1 comment
Open

Support for ujson #72

celestianx opened this issue Feb 2, 2017 · 1 comment

Comments

@celestianx
Copy link

Hi,
ujson is recognized as a really fast json encoder/decoder, would it be possible to choose the json encoder/decoder library as part of arguments

@adewes
Copy link
Owner

adewes commented Feb 2, 2017

Hey @celestian02 , that should be easy to do! Do you want to make the change and open a PR?

You'd need to modify two files:
https://github.com/adewes/blitzdb/blob/master/blitzdb/backends/file/serializers.py

Here you'd need to add a new serializer class that imports "ujson" instead of "json" (you can have a look at the CJsonSerializer class for an example)

https://github.com/adewes/blitzdb/blob/master/blitzdb/backends/file/backend.py

Here you'd just need to add 'ujson' to the list of serializers (again, you can have a look at the 'cjson' example).

Let me know if I can help you with anything!

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

2 participants