Message271272
If you break the invariants (in this case: a list has an accurate len) code that expects lists is only going to work by accident.
What you really want to do is define your own json encoder for your type. If that isn't possible for a streamed sequence of undefined length, then enhancing json's extension machinery to allow it would be a good feature request.
That said, could json's ability to handle this be improved? Possibly. I think we would accept a patch if it doesn't make the code more complicated. Ideally handling certain cases as "don't care" makes the code simpler, but that may or may not be the case here. Or it may come out as a consequence of the enhancement. |
|
Date |
User |
Action |
Args |
2016-07-25 13:48:42 | r.david.murray | set | recipients:
+ r.david.murray, SilentGhost, altvod |
2016-07-25 13:48:42 | r.david.murray | set | messageid: <1469454522.47.0.90440384421.issue27613@psf.upfronthosting.co.za> |
2016-07-25 13:48:42 | r.david.murray | link | issue27613 messages |
2016-07-25 13:48:42 | r.david.murray | create | |
|