Skip to content
This repository has been archived by the owner on Sep 23, 2022. It is now read-only.

json encoding python types #5

Open
adq opened this issue Aug 25, 2012 · 0 comments
Open

json encoding python types #5

adq opened this issue Aug 25, 2012 · 0 comments

Comments

@adq
Copy link

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant