[issue29663] Make collections.deque json serializable

2017-02-27 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue20774.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage: needs patch -> resolved
status: open -> closed
superseder:  -> collections.deque should ship with a stdlib json serializer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29663] Make collections.deque json serializable

2017-02-27 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 This isn't really different that how we handle tuples and I can see that it 
would be useful to be able to dump a deque into JSON.  I concur that it is 
reasonable to ignore maxlen because that is primarily a convenience feature 
(auto-popping on overflow) rather than something that is intrinsic to the 
semantics of data itself.

--
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29663] Make collections.deque json serializable

2017-02-27 Thread Tarek Ziadé

New submission from Tarek Ziadé:

collections.deque could be serialized in JSON as a simple array.

The only thing we can lose in the process is the maxlen value, but I think it's 
a decent behaviour to ignore it when encoding and to set it to None when 
decoding.

--
components: Library (Lib)
messages: 288629
nosy: rhettinger, tarek
priority: normal
severity: normal
status: open
title: Make collections.deque json serializable
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com