* Eelco Hoogendoorn <hoogendoorn.ee...@gmail.com> [2014-12-13]: > This is a general problem in trying to use JSON to send arbitrary python > objects. Its not made for that purpose, JSON itself only supports a very > limited grammar (only one sequence type for instance, as you noticed), so > in general you will need to specify your own encoding/decoding for more > complex objects you want to send over JSON.
Indeed this is a limitation of JSON. > In the case of an object dtype, dtypestr = str(dtype) gives you a nice > JSONable string representation, which you can convert back into a dtype > using np.dtype(eval(dtypestr)) Yes this works fine, but doesn't work for simple dtypes like int64. V- _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion