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

Already on GitHub? Sign in to your account

json encoding python types #5

adq opened this Issue Aug 25, 2012 · 0 comments


None yet
1 participant

adq commented Aug 25, 2012

Hi, one obvious problem is the lack of support for encoding custom types... for example datetime.datetime currently fails saying its not JSON serializable.

The best way to do this would be to pass an encoder class to the json.dumps() call in send_request. I was thinking if you could supply an encoder and decoder class when you call the ESClient constructor it would give the maximum flexibility, but still keep the ESClient API simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment