LuminosoInsight/syncstomp — pull request #11 by akenney (2014-03-20 22:06:32+00:00)
Title: Use a custom JSON encoder so that we can convert numpy types into non-numpy types.

Some things to note:

- This means syncstomp now depends on numpy, which is weird, but it was decided that that is the best solution.
- It turns out that in most cases this is faster than json.dumps, which has to check some stuff and possibly create a new encoder.
- Numpy types are not treated exactly the same as regular types, in that the JSON encoder will convert dictionary keys that are regular types into strings, but it will raise TypeErrors for dictionary keys that are numpy types. Really it should be raising TypeErrors for the regular types too, it's just doing what JavaScript does.