This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Serialize array.array to JSON by default
Type: enhancement Stage:
Components: Extension Modules Versions: Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Omer.Katz, anish.shah, ezio.melotti, pitrou, rhettinger, shakur shams Mullick
Priority: normal Keywords:

Created on 2016-02-01 18:50 by Omer.Katz, last changed 2022-04-11 14:58 by admin.

Messages (1)
msg259341 - (view) Author: Omer Katz (Omer.Katz) * Date: 2016-02-01 18:50
Is there a reason why the JSON module doesn't serialize array.array() instances by default?
Currently you need to convert them to tuples but I'm confident that the C API for those types is enough to iterate over the array and serialize it to a JSON list.
We should support serializing arrays by default in my opinion.
History
Date User Action Args
2022-04-11 14:58:27adminsetgithub: 70451
2016-03-08 18:59:11shakur shams Mullicksetnosy: + shakur shams Mullick
2016-02-04 07:56:06anish.shahsetnosy: + anish.shah
2016-02-02 11:34:20SilentGhostsetnosy: + rhettinger, pitrou, ezio.melotti
components: + Extension Modules, - Interpreter Core
2016-02-01 18:50:39Omer.Katzcreate