[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> rejected ___ Python tracker ___

[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Bob Ippolito
Bob Ippolito added the comment: Agreed, this does seem unnecessary. The library has been in active use for over a decade, and this is the first time I've seen this request. I would recommend preprocessing the data that you're going to encode if you have a need for this. -- stage: ->

[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I concur with Raymond. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: Sorry, I think this is unnecessary feature creep. The goal of the JSON module is to generate valid JSON for some semantically equivalent Python. Wanting to turn *True* into the string "True" isn't in the spirit of the module and certainly not worth all

[issue30114] json module: it is not possible to override 'true', 'false' values during encoding bool

2017-04-20 Thread Marian Horban
New submission from Marian Horban: It is not possible to override 'true', 'false' values during encoding bool. For example if I want to dump dict like: {"key": True} and result must be not {"key": true} but let's say {"key": "TRUE"} It is really hard to force json.dumps function to